/* ---------- base styles ---------- */
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background-color: #fff;
    color: #333;
}
header {
    background-color: #111;
    padding: 10px 0;
}
.navbar {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    align-items: center;
}
.logo a {
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
}
nav a {
    color: white;
    margin-left: 25px;
    text-decoration: none;
    font-size: 16px;
}
footer {
    text-align: center;
    background: #f2f2f2;
    padding: 20px;
    margin-top: 50px;
}

/* ---------- banner / shop CTA ---------- */
.banner {
    width: 100%;
    height: auto;
    position: relative;
}
.banner img {
    width: 100%;
    height: auto;
}
.shop-now-btn {
    text-align: center;
    margin-top: 20px;
}
.shop-now-btn a {
    padding: 12px 30px;
    background-color: #e91e63;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}

/* ---------- original shop grid ---------- */
.shop-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: auto;
}

/* ---------- fallback/legacy saree-card (kept for compatibility) ---------- */
.saree-card {
    border: 1px solid #eee;
    padding: 15px;
    margin: 10px;
    width: 250px;
    text-align: center;
    border-radius: 10px;
}
.saree-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}
.buy-btn {
    background-color: #e91e63;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    border-radius: 5px;
}

/* =========================
   New / updated product styles
   ========================= */

/* Product card used by shop.html */
.product-card {
    border: 1px solid #eee;
    padding: 14px;
    width: 250px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    background: #fff;
    box-sizing: border-box;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 10px;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Image carousel and images */
.image-carousel {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f8f8;
}
.carousel-images {
    display: flex;
    transition: transform 0.35s ease;
    height: 100%;
}
.carousel-image {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* carousel controls/dots (optional) */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }

.carousel-dots { display:flex; justify-content:center; gap:6px; margin-top:8px; }
.carousel-dot { width:8px; height:8px; border-radius:50%; background:#ddd; cursor:pointer; }
.carousel-dot.active { background: linear-gradient(135deg,#8b4513,#a0522d); }

/* Product information */
.product-info { text-align: center; padding: 6px 4px 0 4px; flex: 1; display:flex; flex-direction:column; justify-content:space-between; }
.product-name { font-size: 16px; font-weight: 700; color: #2d2d2d; margin: 8px 0 4px 0; min-height: 44px; }
.product-price { font-size: 18px; font-weight: 800; color: #111; margin-bottom: 6px; }

/* short description / SEO snippet */
.product-desc {
    font-size: 13px;
    color: #666;
    min-height: 42px;
    margin: 6px 0 8px 0;
}

/* Buttons area and look */
.product-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    flex-wrap: nowrap;
}

/* Ensure buttons are compact and single-line on desktop */
.cart-button,
.buy-button {
    padding: 10px 14px !important;    /* reduced padding for desktop */
    height: 40px;                     /* fixed height to avoid wrapping */
    line-height: 20px;                /* keeps text vertically centered */
    white-space: nowrap;              /* prevents line breaks */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px !important;
    border-radius: 40px;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Specific colors (keep your brand gradients) */
.buy-button {
    background: linear-gradient(135deg,#4caf50,#2e7d32);
}
.cart-button {
    background: linear-gradient(135deg,#8b4513,#a0522d);
}

/* When item already in cart */
.cart-button.already-in-cart {
    background: linear-gradient(135deg,#9e9e9e,#757575);
    cursor: not-allowed;
    opacity: 0.9;
}

/* smaller icon size for desktop */
.button-icon {
    font-size: 14px !important;
}

/* ensure buy ripple effect doesn't overflow */
.buy-button { position: relative; overflow: hidden; }

/* ---------- responsive adjustments ---------- */
/* Tablet: 2 columns */
@media (max-width: 768px) {
    .product-card { width: calc(50% - 22px); }
}

/* Mobile: 2 per row (recommended) */
@media (max-width: 480px) {
    .product-card { width: calc(50% - 16px); }
    .image-carousel { height: 180px; }
    .product-name { font-size: 13px; }
    .product-price { font-size: 15px; }
    .product-buttons {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    .buy-button, .cart-button {
        min-width: 100%;
        border-radius: 8px;
        padding: 8px;
        font-size: 12px !important;
        height: auto;
        line-height: normal;
    }
    /* smaller icons in mobile */
    .button-icon { font-size: 12px !important; }
}

/* Zoom modal base (kept minimal here) */
.zoom-modal { display:none; position:fixed; z-index:1000; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); cursor:zoom-out; }
.zoom-modal.active { display:flex; align-items:center; justify-content:center; }
.zoom-content { position:relative; max-width:90%; max-height:90%; display:flex; align-items:center; justify-content:center; }
.zoom-image { max-width:100%; max-height:100%; object-fit:contain; }
.zoom-close { position:absolute; top:18px; right:28px; color:white; font-size:36px; cursor:pointer; z-index:1001; }

/* ripple helper */
.ripple { position:absolute; border-radius:50%; background: rgba(255,255,255,0.6); transform:scale(0); animation: ripple 0.6s linear; pointer-events:none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
