body {
    margin: 0;
    background: #fffaf4;
    color: #302721;
}

#mySidebar {
    width: 250px;
}

#mySidebar .sidebar-brand img {
    display: block;
    width: 140px;
    max-width: 140px;
    height: auto;
    margin: 0 auto;
}

.product-page,
.main {
    box-sizing: border-box;
}

.product-view {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

:root {
    --product-ink: #302721;
    --product-muted: #5f554d;
    --product-cream: #fffaf4;
    --product-sand: #f7f3ed;
    --product-brown: #5d4037;
    --product-dark: #211b17;
    --product-gold: #e3b982;
    --product-border: #ded5c9;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: 1rem 0 2rem;
}

.main {
    position: relative;
    margin: 0 0 0 260px;
    padding: 1rem 2rem 4rem;
}

.product-intro {
    padding: 0 0 0.9rem;
}

.product-error {
    display: grid;
    place-items: center;
    padding: 3rem 1rem;
    text-align: center;
}

.product-error-card {
    padding: 2rem;
    border: 1px solid #ded5c9;
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 0.35rem 1rem rgba(65, 48, 35, 0.1);
}

.product-error-card h2 {
    margin: 0 0 1.5rem;
    font-family: 'Quicksand', sans-serif;
}

.product-intro-price {
    margin-top: -0.65rem;
    color: #5d4037;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
}

.product-intro {
    padding: 0 0 0.9rem;
}

.product-heading-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.product-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    color: #795548;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
}

.product-breadcrumb:hover,
.product-breadcrumb:focus-visible {
    color: #302721;
}

.product-eyebrow {
    margin: 0 0 0.35rem;
    color: #795548;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-price-original {
    margin-right: 0.5rem;
    color: #9b8f83;
    text-decoration: line-through;
    font-weight: 400;
}

.product-price-sale {
    color: #a3392f;
}

.product-gallery {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
}

.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #ded5c9;
    border-radius: 0.7rem;
    background: #f7f3ed;
    box-shadow: 0 0.35rem 1rem rgba(65, 48, 35, 0.1);
}

.slide {
    display: none;
}

.image-container img.slide {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.arrow {
    position: absolute;
    top: 50%;
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    transform: translateY(-50%);
    place-items: center;
    border: 1px solid rgba(255, 250, 244, 0.7);
    border-radius: 50%;
    background: rgba(33, 27, 23, 0.72);
    color: #fffaf4;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: background-color 160ms ease, transform 160ms ease;
}

.arrow:hover,
.arrow:focus-visible {
    background: #5d4037;
    outline: 3px solid rgba(227, 185, 130, 0.45);
}

.arrow:focus-visible {
    transform: translateY(-50%) scale(1.04);
}

.left {
    left: 1rem;
}

.right {
    right: 1rem;
}

.product-details {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin: 0;
    color: #302721;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.1;
}

.product-attributes {
    margin-top: 0;
    border: 1px solid #4b3e34;
    border-radius: 0.7rem;
    background: var(--product-dark);
    box-shadow: 0 0.35rem 1rem rgba(33, 27, 23, 0.18);
    padding: 1.25rem;
}

.product-attributes h2 {
    margin: 0 0 1rem;
    color: var(--product-cream);
    font-family: 'Dancing Script', cursive;
    font-size: 1.75rem;
    line-height: 1.1;
}

.product-attributes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.product-attribute,
.product-notes {
    margin: 0;
    color: #d8c1a0;
    font-family: 'Quicksand', sans-serif;
    line-height: 1.45;
}

.product-attribute span {
    color: var(--product-cream);
    font-size: 1rem;
}

.product-notes {
    grid-column: 1 / -1;
    border-top: 1px solid #4b3e34;
    padding-top: 1rem;
}

.product-notes b {
    color: var(--product-gold);
    font-size: 1rem;
}

.product-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    border-top: 1px solid var(--product-border);
    padding-top: 1.25rem;
    margin-top: auto !important;
}

.product-button {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.product-button:hover,
.product-button:focus-visible {
    transform: translateY(-2px);
    outline: 3px solid rgba(227, 185, 130, 0.45);
}

.product-button--primary {
    background: #d8c1a0;
    color: #302721;
}

.product-button--primary:hover,
.product-button--primary:focus-visible {
    background: #c8a97e;
    color: #302721;
}

.product-button--secondary {
    background: #d8c1a0;
    color: #302721;
}

.product-button--secondary:hover,
.product-button--secondary:focus-visible {
    background: #c8a97e;
    color: #302721;
}

.product-button--disabled,
.product-button--disabled:hover {
    background: #ded5c9;
    color: #6f6258;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 899px) {
    #mySidebar {
        width: 0;
    }

    .main {
        margin-left: 0;
        padding: 0.75rem 1rem 3rem;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-top: 0;
    }

    .product-intro {
        padding-top: 0;
    }

    .product-heading-row {
        gap: 0;
    }

    .product-intro-price {
        font-size: 1.15rem;
    }

    .product-actions {
        margin-top: 1rem !important;
    }
}

@media (max-width: 600px) {
    .product-gallery {
        width: 100%;
    }

    .image-container {
        aspect-ratio: 1 / 1;
    }

    .product-attributes-grid,
    .product-actions {
        grid-template-columns: 1fr;
    }

    .product-notes {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arrow,
    .product-button {
        transition: none;
    }
}
