/* ==========================================
   HER LITTLE RITUALS
   REUSABLE COMPONENTS
========================================== */


/* ==========================================
   1. BUTTONS
========================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 12px 22px;

    border: 1px solid transparent;
    border-radius: 6px;

    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.button-primary {
    background: var(--color-action);
    color: var(--color-on-action);
    border-color: var(--color-action);
}

.button-primary:hover:not(:disabled) {
    background: var(--color-action-hover);
    border-color: var(--color-action-hover);
}

.button-secondary {
    background: transparent;
    color: var(--color-action);
    border-color:var(--color-action);
}

.button-secondary:hover:not(:disabled) {
    background:var(--color-surface-tint);
}

.button-full {
    width: 100%;
}


/* ==========================================
   2. PRODUCT CARDS
========================================== */

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;

    overflow: hidden;

    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-subtle);
    border-radius: 10px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(176, 58, 95, 0.09);
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.product-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 18px;
}

.product-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.product-card p {
    line-height: 1.6;
}

.product-price {
    margin: 12px 0;
    font-weight: 700;
}

.product-card .button {
    width: 100%;
    margin-top: auto;
}


/* ==========================================
   3. BADGES
========================================== */

.badge {
    display: inline-flex;
    align-items: center;

    width: fit-content;
    padding: 5px 10px;

    border-radius: 30px;

    font-size: 0.75rem;
    font-weight: 600;
}

.badge-new {
    background: var(--color-surface-brand);
    color: var(--color-text);
}

.badge-popular {
    background: var(--color-success-bg);
    color:var(--color-success-text);
}

.badge-unavailable {
    background: var(--color-neutral-bg);
    color: var(--color-neutral-text);
}


/* ==========================================
   4. FORM FIELDS
========================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;

    margin-bottom: 18px;
}

.form-group label {
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;

    border: 1px solid var(--color-field-border);
    border-radius: 6px;

    background: var(--color-surface-raised);
    color: var(--color-text);

    font: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--color-focus);
    outline-offset: 1px;
    border-color: var(--color-focus);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--color-neutral-bg);
    cursor: not-allowed;
}


/* ==========================================
   5. NOTIFICATIONS
========================================== */

.notification {
    padding: 14px 16px;
    margin: 15px 0;

    border: 1px solid transparent;
    border-radius: 6px;

    line-height: 1.6;
}

.notification-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success-text);
}

.notification-error {
    background: var(--color-danger-bg);
    border-color: var(--color-danger-border);
    color: var(--color-danger-text);
}

.notification-info {
    background: var(--color-info-bg);
    border-color: var(--color-info-border);
    color: var(--color-info-text);
}

.notification-warning {
    background: var(--color-warning-bg);
    border-color: var(--color-warning-border);
    color: var(--color-warning-text);
}


/* ==========================================
   6. QUANTITY CONTROLS
========================================== */

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quantity-control button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border: 1px solid var(--color-field-border);
    border-radius: 5px;

    background: var(--color-surface-raised);
    color: var(--color-text);

    cursor: pointer;
}

.quantity-control button:hover {
    background: var(--color-surface-tint);
}

.quantity-control input {
    width: 55px;
    min-height: 36px;
    padding: 5px;

    border: 1px solid var(--color-field-border);
    border-radius: 5px;

    text-align: center;
}


/* ==========================================
   7. EMPTY STATES
========================================== */

.empty-state {
    padding: 45px 20px;
    text-align: center;
}

.empty-state h2 {
    margin-bottom: 12px;
}

.empty-state p {
    margin-bottom: 22px;
    line-height: 1.7;
}


/* ==========================================
   8. LOADING INDICATOR
========================================== */

.loading-spinner {
    display: inline-block;

    width: 24px;
    height: 24px;

    border: 3px solid 	var(--color-border);
    border-top-color: var(--color-action);
    border-radius: 50%;

    animation: hlr-spin 0.8s linear infinite;
}

@keyframes hlr-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ==========================================
   9. ACCESSIBILITY
========================================== */

.visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);

    white-space: nowrap;
    border: 0;
}

/* ============================================
   HER LITTLE RITUALS — PACKAGE PRICE STYLING
============================================ */

.product-info .product-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    min-height: 40px;

    margin: 12px 0 15px;
    padding: 10px 18px;

    background-color: var(--rose-dark);
    color: var(--white);

    border: 1px solid var(--rose-dark);
    border-radius: 0;

    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
