﻿/* Import Google Fonts: Inter (Body) & Playfair Display (Headings) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');
@import 'site-variables.css';

/* 
  Global Layout & Reset 
*/
body {
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

/* 
  Typography Utilities & Overrides
*/
h1, h2, h3, h4, h5, h6, .navbar-brand, .heading-font {
  font-family: var(--font-family-heading);
  font-weight: 600;
  color: var(--color-primary);
}

.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }

.text-muted { color: var(--color-text-muted) !important; }
.text-subtle { color: var(--color-text-subtle) !important; }
.text-accent { color: var(--color-accent) !important; }

/* Font Sizing & Spacing Utilities (Replacing Inline Styles) */
.text-sm { font-size: 0.875rem !important; }
.text-xs { font-size: 0.75rem !important; }
.text-xxs { font-size: 0.65rem !important; }
.text-price { font-size: 0.8rem !important; }
.tracking-wide { letter-spacing: 0.05em !important; }
.lh-15 { line-height: 1.5 !important; }

/* 
  Background & Surface Utilities 
*/
.bg-background { background-color: var(--color-background) !important; }
.bg-surface { background-color: var(--color-surface) !important; }
.bg-surface-alt { background-color: var(--color-surface-alt) !important; }
.bg-primary { background-color: var(--color-primary) !important; color: #fff; }
.bg-accent { background-color: var(--color-accent) !important; color: #fff; }

/* 
  Component Overrides 
*/
.btn {
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}

.btn-accent {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.btn-accent:hover, .btn-accent:focus {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

/* Ensure outline buttons do not default to Bootstrap blue */
.btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: transparent;
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  color: #fff;
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* 
  Card / Product Aesthetics 
*/
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  background-color: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(106, 27, 47, 0.05);
}
.product-image-container {
  background-color: var(--color-surface);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.product-image-container img {
  object-fit: cover;
  width: 100%;
  aspect-ratio: 3 / 4; /* Better aspect ratio for sarees/apparel */
}

/* Badges */
.badge-discount {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 600;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
}
.btn-wishlist {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.btn-wishlist:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Layout Utilities */
.hero-section { min-height: 80vh; }
.footer-text-max { max-width: 300px; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.object-fit-cover { object-fit: cover; }

/* Image Hover Zoom Utility */
.hover-zoom-container { overflow: hidden; }
.hover-zoom-container img { transition: transform 0.7s ease; }
.hover-zoom-container:hover img { transform: scale(1.05); }

/* Video Overlay Play Button */
.video-play-btn {
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.video-play-btn:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.7) !important;
}
.video-play-btn-inner {
    width: 56px; 
    height: 56px; 
    backdrop-filter: blur(4px); 
    cursor: pointer;
}

/* Product Snippet Enhancements */
.product-snippet {
    transition: background-color 0.2s ease;
}
.product-snippet:hover {
    background-color: var(--color-border) !important;
}
.product-snippet-img {
    width: 50px; 
    height: 65px; 
    object-fit: cover;
}

/* 
  Forms 
*/
.form-control {
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
  background-color: #fff;
}
.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 0.2rem rgba(197, 160, 89, 0.25);
}

/* Custom Nav styling */
.nav-link {
  font-weight: 500;
  color: var(--color-text-primary);
}
.nav-link:hover {
  color: var(--color-accent);
}

/* Product Detail & Cart Custom Styles */
.min-vh-80 { min-height: 80vh; }
.w-auto-inline { width: auto !important; }
.w-100px { width: 100px; }
.max-w-100px { max-width: 100px; }
.h-56px { height: 56px; }
.flex-shrink-0 { flex-shrink: 0; }
.cursor-pointer { cursor: pointer; }
.cursor-zoom-in { cursor: zoom-in; }
.transform-origin-center { transform-origin: center; }

/* Color Swatches */
.color-swatch-maroon { background-color: #800020; border-color: #eee; }
.color-swatch-emerald { background-color: #004d40; border-color: #eee; }
.color-swatch-peach { background-color: #ffdab9; border-color: #eee; }

.color-swatch:before {
    content: ''; 
    position: absolute; 
    top: -4px; 
    left: -4px; 
    right: -4px; 
    bottom: -4px; 
    border: 2px solid transparent; 
    border-radius: 50%; 
    transition: border-color 0.2s;
}
.btn-check:checked + .color-swatch:before { 
    border-color: var(--bs-primary); 
}

.thumbnail-item.active { 
    border-color: var(--bs-primary) !important; 
    opacity: 1 !important; 
}

/* =============================================
   Checkout Page
   ============================================= */

/* Thumbnail image in order summary sidebar */
.checkout-item-thumb {
    width: 60px;
    height: 75px;
    flex-shrink: 0;
}

/* Quantity badge overlaid on the thumbnail */
.checkout-qty-badge {
    font-size: 0.65rem;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Payment method option container */
.payment-option {
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.payment-option:hover {
    border-color: var(--bs-primary) !important;
}

/* =============================================
   Responsive Fixes
   ============================================= */

/* Prevent any child element from breaking out of viewport */
/* Product Detail: action row (qty + add to cart + wishlist) */
.product-action-row {
    height: 52px;
}

.product-qty-select {
    width: 90px;
    height: 100%;
    flex-shrink: 0;
}

/* On mobile, stack the action row elements with auto height */
@@media (max-width: 575.98px) {
    .product-action-row {
        height: auto;
        flex-wrap: wrap;
    }
    .product-qty-select {
        width: 100%;
        height: 44px;
    }
}

/* Cart: ensure column header widths match the data columns */
.cart-col-product  { flex: 0 0 50%; max-width: 50%; }
.cart-col-price    { flex: 0 0 16.66%; max-width: 16.66%; }
.cart-col-qty      { flex: 0 0 16.66%; max-width: 16.66%; }
.cart-col-total    { flex: 0 0 16.66%; max-width: 16.66%; }

/* =============================================
   Site Header (sticky, full-bleed)
   ============================================= */
.site-header {
    /* Ensure header always sits above sticky order summary and any overlays */
    z-index: 1030;
    background: var(--bs-white, #fff);
}

/* =============================================
   Sticky Order Summary (Cart & Checkout)
   Offset top = header height (~100px on desktop, ~80px on mobile)
   ============================================= */
.cart-summary-sticky {
    /* Sits below header z-index so it scrolls under when needed */
    position: sticky;
    top: 100px;
    z-index: 100;
}

/* On mobile the aside stacks below the form — disable sticky so it
   flows naturally with the page and doesn't obscure content */
@@media (max-width: 991.98px) {
    .cart-summary-sticky {
        position: static;
        top: auto;
    }
}

/* =============================================
   Overflow / Horizontal Scroll Prevention
   Use overflow-x: clip on body (NOT hidden) — "hidden" creates a new scroll
   container which silently breaks position: sticky on ALL descendants.
   "clip" prevents the scrollbar without creating a scroll container.
   ============================================= */


/* Flex children that contain text must be able to shrink below their content size */
.min-w-0 { min-width: 0; }


/* Cart item thumbnail */
.cart-item-thumb {
    width: 80px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure cart item product info text doesn't overflow */
.cart-item-info {
    min-width: 0;
    overflow: hidden;
}





/* ========================================================================= */
/* UTILITY CLASSES (Replaced Inline Styles) */
/* ========================================================================= */
.min-vh-custom { min-height: calc(100vh - 150px); }
.max-w-500 { max-width: 500px; }
.max-w-550 { max-width: 550px; }
.max-w-600 { max-width: 600px; }
.h-200 { height: 200px; }
.h-500 { height: 500px; }
.min-h-200 { min-height: 200px; }
.min-h-250 { min-height: 250px; }
.sticky-top-100 { top: 100px; }
.avatar-50 { width: 50px; height: 50px; }
.product-thumb-sm { width: 50px; height: 60px; }
.fs-4rem { font-size: 4rem; }
.bg-gradient-dark-bottom { background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.offcanvas-search { height: auto; max-height: 100vh; }

/* Background Images */
.bg-image-maroon {
    background-image: url('/assets/images/maroon_saree.jpg');
    background-size: cover;
    background-position: center;
}
.bg-image-peach {
    background-image: url('/assets/images/peach_saree.jpg');
    background-size: cover;
    background-position: center;
}
.bg-image-product4 {
    background-image: url('/assets/images/product-4.jpg');
    background-size: cover;
    background-position: center;
}
.hero-home {
    background: url('/assets/images/green_saree.jpg') center/cover no-repeat;
}
.hero-about {
    background: url('/assets/images/product-4.jpg') center/cover no-repeat;
    min-height: 400px;
}

.bg-image-green {
    background-image: url('/assets/images/green_saree.jpg');
    background-size: cover;
    background-position: center;
}
.letter-spacing-otp {
    letter-spacing: 0.5rem;
}
