/* SYMPHORIA — Unified storefront design */

:root {
    --sp-final-black: #171717;
    --sp-final-gold: #d4b650;
    --sp-final-deep-gold: #80651f;
    --sp-final-ivory: #f8f5ee;
    --sp-final-white: #ffffff;
    --sp-final-text: #292723;
    --sp-final-muted: #68645d;
    --sp-final-border: #e4dfd5;
    --sp-final-heading: "Cormorant Garamond", Georgia, serif;
    --sp-final-body: "Jost", Arial, sans-serif;
}

main {
    color: var(--sp-final-text);
    font-family: var(--sp-final-body);
    font-size: 15px;
    line-height: 1.65;
    min-width: 0;
}

main *,
main *::before,
main *::after {
    box-sizing: border-box;
}

main h1,
main h2 {
    font-family: var(--sp-final-heading);
    font-weight: 500;
    color: var(--sp-final-black);
    letter-spacing: -.015em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

main h1 {
    font-size: clamp(34px, 4.2vw, 58px);
}

main h2 {
    font-size: clamp(26px, 3vw, 40px);
}

main h3 {
    line-height: 1.35;
}

main p {
    overflow-wrap: anywhere;
}

main img {
    max-width: 100%;
}

main a,
main button,
main input,
main select,
main textarea {
    -webkit-tap-highlight-color: transparent;
}

main :is(a,button,input,select,textarea,summary):focus-visible {
    outline: 2px solid var(--sp-final-deep-gold);
    outline-offset: 4px;
}

/* Inner page typography and spacing */

.sp-inner-page main {
    min-height: 52vh;
}

.sp-inner-page main .container {
    width: min(1440px, calc(100% - 64px));
    margin-inline: auto;
}

.sp-inner-page main h1 {
    margin-block: 0 18px;
}

.sp-inner-page main h2 {
    margin-block: 0 18px;
}

.sp-inner-page main p {
    line-height: 1.75;
}

/* Consistent form fields */

main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="file"]):not([type="button"]),
main select,
main textarea {
    min-height: 46px;
    max-width: 100%;
    padding: 11px 14px;
    background: #fff;
    color: var(--sp-final-black);
    border: 1px solid var(--sp-final-border);
    border-radius: 4px;
    font-family: var(--sp-final-body);
    font-size: 15px;
    line-height: 1.4;
    transition: border-color .18s ease;
}

main textarea {
    min-height: 110px;
    resize: vertical;
}

main input:focus,
main select:focus,
main textarea:focus {
    border-color: var(--sp-final-deep-gold);
}

main label {
    font-weight: 500;
}

main input[type="checkbox"],
main input[type="radio"] {
    accent-color: var(--sp-final-deep-gold);
}

main button {
    font-family: var(--sp-final-body);
    cursor: pointer;
}

main button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.sp-inner-page main button[type="submit"] {
    min-height: 44px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.4;
}

/* Catalog cards */

main .catalog-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--sp-final-border);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

main .catalog-card:hover {
    border-color: #c8bfae;
    box-shadow: 0 6px 20px rgba(23,23,23,.045);
}

main .catalog-card-media {
    background: var(--sp-final-ivory);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

main .catalog-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

@media (hover:hover) {
    main .catalog-card:hover .catalog-card-media img {
        transform: scale(1.025);
    }
}

main .catalog-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 17px;
    min-width: 0;
}

main .catalog-card-content h2,
main .catalog-card-content h3 {
    font-family: var(--sp-final-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    margin-block: 7px;
}

main .catalog-product-link {
    color: var(--sp-final-black);
    text-decoration: none;
}

main .catalog-price {
    color: var(--sp-final-black);
    font-variant-numeric: tabular-nums;
}

main .sp-purchase-actions {
    margin-top: auto;
}

main .sp-purchase-actions button,
main .sp-purchase-actions a {
    font-size: 12px;
    min-height: 42px;
    line-height: 1.35;
}

/* Product and checkout content */

.sp-inner-page main :is(
    .product-gallery,
    .product-information,
    .product-details,
    .cart-summary,
    .checkout-summary,
    .checkout-card,
    .checkout-panel,
    .order-summary,
    .cart-panel,
    .checkout-review
) {
    min-width: 0;
}

.sp-inner-page main :is(
    .cart-summary,
    .checkout-summary,
    .checkout-card,
    .checkout-panel,
    .order-summary,
    .cart-panel,
    .checkout-review
) {
    border: 1px solid var(--sp-final-border);
    border-radius: 5px;
    box-shadow: none;
}

.sp-inner-page main :is(
    .cart-summary,
    .checkout-summary,
    .order-summary
) {
    background: var(--sp-final-ivory);
    padding: clamp(18px, 2.5vw, 30px);
}

.sp-inner-page main :is(
    .cart-item,
    .checkout-item,
    .order-summary-item
) {
    border-bottom: 1px solid var(--sp-final-border);
}

.sp-inner-page main :is(
    .product-price,
    .product-price-current,
    .cart-total,
    .checkout-total,
    .order-total
) {
    font-variant-numeric: tabular-nums;
}

.sp-inner-page main :is(
    .product-description,
    .product-notes,
    .product-benefits
) {
    line-height: 1.75;
}

/* Account and informational pages */

.sp-inner-page main :is(
    .account-card,
    .account-panel,
    .account-summary,
    .address-card,
    .tracking-card,
    .tracking-panel,
    .auth-card
) {
    background: #fff;
    border: 1px solid var(--sp-final-border);
    border-radius: 5px;
    box-shadow: none;
    min-width: 0;
}

.sp-inner-page main :is(
    .account-card,
    .account-panel,
    .tracking-card,
    .auth-card
) {
    padding: clamp(20px, 3vw, 34px);
}

.sp-inner-page main :is(
    .content-page,
    .cms-page,
    .blog-article,
    .content-article,
    .sp-content-page,
    .sp-blog-article
) {
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.sp-inner-page main article p {
    line-height: 1.75;
}

.sp-inner-page main article :is(ul,ol) {
    padding-inline-start: 22px;
}

.sp-inner-page main article li {
    margin-block: 7px;
}

/* Accessible expandable content */

.sp-inner-page main details > summary {
    cursor: pointer;
    font-weight: 500;
}

.sp-inner-page main details[open] > summary {
    color: var(--sp-final-deep-gold);
}

/* Quick view dialogs */

main dialog {
    max-width: min(880px, calc(100% - 32px));
    max-height: 90dvh;
    border: 1px solid var(--sp-final-border);
    border-radius: 6px;
    overflow: auto;
}

main dialog::backdrop {
    background: rgba(23,23,23,.62);
}

/* Mobile consistency */

@media (max-width: 767px) {

    .sp-inner-page main .container {
        width: calc(100% - 28px);
    }

    main h1 {
        font-size: clamp(30px, 8vw, 40px);
    }

    main h2 {
        font-size: clamp(25px, 6vw, 32px);
    }

    main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    main select,
    main textarea {
        font-size: 16px;
    }

    main .catalog-card-content {
        padding: 12px;
    }

    main .catalog-card-content h2,
    main .catalog-card-content h3 {
        font-size: 13px;
    }

    main .sp-purchase-actions button,
    main .sp-purchase-actions a {
        font-size: 11px;
        padding-inline: 6px;
    }

    .sp-inner-page main :is(
        .product-layout,
        .product-detail-grid,
        .cart-layout,
        .checkout-layout,
        .checkout-grid
    ) {
        grid-template-columns: minmax(0,1fr);
        gap: 20px;
    }

    .sp-inner-page main :is(
        .cart-summary,
        .checkout-summary,
        .order-summary
    ) {
        position: static;
    }

    main dialog {
        max-width: calc(100% - 20px);
        max-height: 92dvh;
    }
}

@media (prefers-reduced-motion: reduce) {

    main *,
    main *::before,
    main *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
