/* 
   Uyirmei Art & Craft India - Unified Design System 
   Montserrat Typography | Strict Product Card Preservation | Standardized Components
*/

::selection {
    background: #c59d5f;
    color: #ffffff;
}

::-moz-selection {
    background: #c59d5f;
    color: #ffffff;
}

:root {
    /* Brand Colors */
    --primary: #8E1B22;
    --primary-dark: #6a1419;
    --primary-light: #b84a51;
    --gold: #c59d5f;
    --gold-dark: #a6824a;
    --gold-light: #e8d3b0;
    --sand: #FDF8F0;
    --bg-white: #FFFFFF;
    --text-dark: #2c2c2c;
    --text-gray: #6c6c6c;
    --border-light: #F0E8DC;

    /* Global Directives */
    --border-radius: 8px;
    --transition: all 0.4s cubic-bezier(0.2, 0.95, 0.4, 1.05);
}

/* 1. TYPOGRAPHY ENFORCEMENT (Montserrat Only) */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span:not(.fa, .fab, .fas, .far, .fa-solid, .fa-regular, .fa-brands),
button,
input,
select,
textarea {
    font-family: 'Montserrat', sans-serif !important;
}

html,
body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-dark);
    font-weight: 700;
}

/* 2. BUTTON STANDARDIZATION (12px 24px | 8px Radius | Montserrat) */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border: none;
    transition: var(--transition) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
}

.btn-secondary {
    background-color: var(--gold) !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: var(--gold-dark) !important;
}

.btn-primary:active,
.btn-secondary:active,
.btn-outline:active {
    opacity: 0.9;
}


.btn-outline {
    background-color: transparent !important;
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
}

.btn-outline:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* 3. PRODUCT CARD (Source of Truth - Modern E-commerce Overhaul) */
.product-card {
    position: relative;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0e8dc;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.image-box {
    position: relative;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfaf7;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .image-box img {
    transform: scale(1.08);
}

.card-info {
    position: relative;
    padding: 16px 16px 20px;
    text-align: left;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.card-cat {
    font-size: 0.7rem;
    color: var(--text-gray) !important;
    opacity: 0.7;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFB800;
    font-size: 10px;
}

.card-rating span {
    color: var(--text-gray);
    margin-left: 2px;
    font-weight: 500;
}

.product-title {
    font-size: 0.95rem;
    color: var(--text-dark) !important;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 1.4rem;
}

.card-price {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.price-new {
    font-size: 1.2rem;
    font-weight: 800;
    color: #8E1B22 !important;
    /* Luxury Deep Red Accent */
    display: inline-block;
    letter-spacing: -0.02em;
}

.price-old {
    font-size: 0.85rem;
    color: #9ca3af;
    /* Soft Grey */
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 4px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 14px;
    background: #c06c5c;
    border: none;
    border-radius: 4px;
    color: white !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    background: #a4584b;
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 10;
}


/* 4. FORM STANDARDIZATION */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-white);
    outline: none;
    transition: all 0.3s;
}

/* Chrome/Browser Autofill Override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #000000 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 157, 95, 0.1);
    outline: none;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

/* 5. PASSWORD TOGGLE */
.password-toggle-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--primary);
    opacity: 0.5;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 4px;
}

/* --- Global Add to Cart Button Override --- */
:root {
  --primary-yellow: #C59D5F; /* Matched to Header Accent Color */
  --primary-yellow-hover: #a6824a; /* Matched to --gold-dark */
}

/* Target ONLY Add to Cart & View Product buttons globally */
.add-to-cart-btn,
.add-to-cart,
.btn-cart,
.view-product-btn,
button[name="add-to-cart"],
button[onclick*="addToCart"],
button[onclick*="handlePurchase(false)"] {
  background-color: var(--primary-yellow) !important;
  border-color: var(--primary-yellow) !important;
  color: #fff !important;
  display: block !important;
  width: 100% !important;
  padding: 14px !important;
  text-align: center !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  align-self: stretch !important; /* Ensure it spans full width in flex containers */
}

/* Hover effect */
.add-to-cart-btn:hover,
.add-to-cart:hover,
.btn-cart:hover,
.view-product-btn:hover,
button[onclick*="addToCart"]:hover,
button[onclick*="handlePurchase(false)"]:hover {
  background-color: var(--primary-yellow-hover) !important;
  border-color: var(--primary-yellow-hover) !important;
}

/* --- Cart Page Spacing & Empty Cart Fixes --- */
.cart-container,
.cart-page,
.empty-cart {
  padding: 16px !important;
  margin: 0 auto !important;
}

/* Fix excessive top gap */
.cart-container {
  padding-top: 10px !important;
}

/* Center align properly */
.empty-cart {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  min-height: calc(100vh - 120px) !important;
}

/* Reduce spacing inside */
.empty-cart h2 {
  margin-bottom: 10px !important;
}

.empty-cart p {
  margin-bottom: 15px !important;
}

/* Button spacing fix */
.empty-cart a.btn-primary, 
.empty-cart button {
  margin-top: 10px !important;
}

/* Mobile specific fix */
@media (max-width: 768px) {
  .cart-container,
  .empty-cart {
    padding: 12px !important;
  }

  .empty-cart {
    min-height: calc(100vh - 100px) !important;
  }
}

/* Fix summary row alignment */
.summary-row,
.total-row,
.total-final,
.summary-total {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important; /* KEY FIX */
}

/* Label (TOTAL VALUE) */
.summary-total span:first-child,
.total-final span:first-child {
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
}

/* Amount (₹350,000.00) */
.summary-total span:last-child,
.total-final span:last-child {
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important; /* prevents vertical shift */
}

.password-toggle-icon:hover {
    opacity: 1;
    color: var(--brand);
}
/* Remove ONLY shadow from subcategory dropdown */
.navbar .dropdown-menu,
.header .dropdown-menu,
#collectionsDropdown,
.submenu,
ul.dropdown-menu {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}
