/* =========================================================
   SHOP HEADER
   ========================================================= */

.shop .shop-header {
    text-align: center;
    margin-bottom: 3rem;
}

.shop .shop-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop .shop-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.1rem;
}

.shop .shop-subtitle {
    color: #6b7280;
    margin-bottom: 1.25rem;
}

/* =========================================================
   SEARCH & SORT
   ========================================================= */

.shop .shop-search {
    max-width: 380px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    margin: 0 auto 1.25rem;
    display: block;
}

.shop .shop-sort {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 0.8rem;
    background: #fff;
}

/* =========================================================
   CATEGORY PILLS
   ========================================================= */

.shop .shop-categories {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.shop .category-pill {
    padding: 5px 12px;
    font-size: 0.72rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.shop .category-pill:hover {
    background: #f9fafb;
}

.shop .category-pill.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

/* =========================================================
   SHOP GRID
   ========================================================= */

.shop .shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 220px);
    gap: 1.75rem;
    justify-content: center;
}


/* =========================================================
   SHOP PRODUCT CARD
   ========================================================= */

.shop .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.09);
}

/* Card image */
.shop .product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    overflow: hidden;
}

.shop .product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stock badge */
.shop .stock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #111827;
    color: #ffffff;
    font-size: 0.65rem;
    padding: 4px 9px;
    border-radius: 999px;
}

/* Card body */
.shop .product-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 14px 14px 16px;
    text-align: center;
}

.shop .product-card-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 6px;
}

.shop .product-price {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.shop .product-card-body .btn {
    margin-top: auto;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* =========================================================
   PRODUCT DETAIL PAGE
   ========================================================= */

.product .product-page {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 3.5rem;
    align-items: start;
}

/* =========================================================
   PRODUCT MEDIA (FIXED)
   ========================================================= */

.product .product-media {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* FORCE SQUARE IMAGE BOX */
.product .product-media-main {
    width: 100%;
    height: 360px;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;

    /* ensures image never stretches container */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* IMAGE FITS CLEANLY */
.product .product-media-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================================================
   PRODUCT INFO
   ========================================================= */

.product .product-info {
    display: flex;
    flex-direction: column;
}

.product .product-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.product .product-info p.text-muted {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.product .product-info .product-price {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

/* =========================================================
   VARIATION & QUANTITY CONTROLS
   ========================================================= */

.product .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 4px;
}

.product select.form-select,
.product input.form-control {
    font-size: 0.9rem;
    padding: 8px 10px;
    border-radius: 8px;
}

.product form {
    margin-top: 0.5rem;
}

.product .btn {
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 0.85rem;
}

.product .btn-outline-secondary {
    color: #374151;
    border-color: #d1d5db;
}

.product .btn-outline-secondary:hover {
    background: #f9fafb;
}

/* =========================================================
   FULL WIDTH DESCRIPTION
   ========================================================= */

.product .product-description-wide {
    max-width: 900px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .product .product-page {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .product .product-media-main {
        margin: 0 auto;
        max-width: 320px;
    }
}
/* =========================================================
   PRODUCT THUMBNAILS
   ========================================================= */

.product .product-media-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 0.75rem;
}

.product .product-media-thumbs img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    opacity: 0.6;
    transition: opacity 0.15s ease, border-color 0.15s ease;
    background: #fff;
}

.product .product-media-thumbs img:hover {
    opacity: 1;
}

.product .product-media-thumbs img.active {
    opacity: 1;
    border-color: #111827;
}

@media (max-width: 1200px) {
    .shop .shop-grid {
        grid-template-columns: repeat(4, 220px);
    }
}

@media (max-width: 992px) {
    .shop .shop-grid {
        grid-template-columns: repeat(3, 220px);
    }
}

@media (max-width: 720px) {
    .shop .shop-grid {
        grid-template-columns: repeat(2, 220px);
    }
}

@media (max-width: 480px) {
    .shop .shop-grid {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
}

