/* ========================================
   CART PAGE - FINAL CORRECTED VERSION
   ======================================== */

   :root {
    --primary-color: #996633;
    --secondary-color: #AFBD77;
    --color-grey: #848688;
    --color-light-grey: #f5f5f5;
    --color-border: #e0e0e0;
    --color-success: #AFBD77;
    --color-danger: #dc3545;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
  
  /* ========================================
     CART CONTAINER
     ======================================== */
  .cart-block {
    background: var(--color-light-grey);
    min-height: 100vh;
    padding-bottom: 120px;
  }
  
  .cart-block .my-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
  }
  
  /* ========================================
     EMPTY CART
     ======================================== */
  .cart-empty-mt {
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
  }
  
  .cart-empty-mt h2 {
    color: var(--color-grey);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
  }
  
  .cart-empty-bt .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 14px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
  }
  
  .cart-empty-bt .btn-primary:hover {
    background: #7d5229;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  /* ========================================
     CART BODY
     ======================================== */
  #cart_body {
    background: transparent;
    border: none;
    box-shadow: none;
  }
  
  .header-row {
    display: none !important;
  }
  
  /* ========================================
     MOBILE PRODUCT CARD (DEFAULT)
     ======================================== */
  .product-detailing-row {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
  }
  
  .product-detailing-row:active {
    transform: scale(0.98);
  }
  
  .product-detailing-row .d-block.d-lg-none {
    display: none !important;
  }
  
  .product-detailing-row .col-10,
  .product-detailing-row .col-12 {
    padding: 0 48px 0 0 !important;
    margin-bottom: var(--spacing-sm);
  }
  
  .product-detailing-row figure.itemside {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin: 0;
  }
  
  .product-detailing-row figure.itemside .div {
    flex-shrink: 0;
  }
  
  .product-detailing-row figure.itemside img.img-sm {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
  }
  
  .product-detailing-row figcaption.info {
    flex: 1;
    min-width: 0;
  }
  
  .product-detailing-row .title {
    font-size: 14px;
    font-weight: 500;
    color: #282c3f;
    line-height: 1.4;
    margin-bottom: 4px;
    display: block;
    text-decoration: none;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .product-detailing-row .title:hover {
    color: var(--primary-color);
  }
  
  .product-detailing-row .title small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #94969f;
    margin-top: 2px;
  }
  
  .product-detailing-row .text-muted.small {
    font-size: 12px;
    color: #94969f;
    margin: 4px 0 0 0;
    font-weight: 400;
  }
  
  /* Delete Button */
  .product-detailing-row .col-2 {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: auto;
    padding: 0;
    z-index: 10;
  }
  
  .product-detailing-row .btn-container {
    display: flex;
    justify-content: flex-end;
  }
  
  .product-detailing-row .btn-danger {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;  
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: #94969f;
    transition: var(--transition);
    box-shadow: none;
    opacity: 0.7;
  }
  
  .product-detailing-row .btn-danger:hover,
  .product-detailing-row .btn-danger:active {
    background: #fff0f0;
    color: var(--color-danger);
    border-color: #ffe0e0;
    transform: none;
    opacity: 1;
  }
  
  .product-detailing-row .btn-danger i {
    font-size: 13px;
  }
  
  /* MOBILE: Quantity and Price on SAME ROW */
  .product-detailing-row .col-12.quantity-row,
  .product-detailing-row .col-12.price-row {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
    padding: 0 !important;
    margin-top: var(--spacing-md) !important;
  }
  
  .product-detailing-row .col-12.quantity-row {
    margin-right: auto;
  }
  
  .product-detailing-row .col-12.price-row {
    margin-left: var(--spacing-md);
  }
  
  /* Quantity Controls */
  .input-group.input-spinner {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 130px;
  }
  
  .input-group.input-spinner .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-light-grey);
    border: 1px solid var(--color-border);
    color: var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
  }
  
  .input-group.input-spinner .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
  }
  
  .input-group.input-spinner .btn:active {
    transform: scale(0.95);
  }
  
  .input-group.input-spinner .btn i {
    font-size: 11px;
  }
  
  .input-group.input-spinner .form-control {
    width: 44px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    padding: 0;
    flex-shrink: 0;
  }
  
  .input-group.input-spinner .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(153, 102, 51, 0.1);
    outline: none;
  }
  
  /* Price Display */
  .price-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
  }
  
  .price-wrap .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    font-style: normal;
    white-space: nowrap;
  }
  
  .price-wrap small {
    font-size: 11px;
    color: var(--color-grey);
    font-weight: 400;
    white-space: nowrap;
  }
  
  /* ========================================
     CART SUMMARY
     ======================================== */
  .col-lg-4 .card {
    background: white;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-md);
    display: none;
  }
  
  .cart-card-body {
    padding: var(--spacing-lg);
  }
  
  .dlist-align {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
  }
  
  .dlist-align dt {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
  }
  
  .dlist-align dd {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0;
  }
  
  .dlist-align dd#delivery_charges {
    color: var(--color-success);
  }
  
  .cart-card-body hr {
    border-color: var(--color-border);
    margin: var(--spacing-md) 0;
  }
  
  .cart-card-body .text-muted.small {
    font-size: 12px;
    color: var(--color-grey);
    margin-top: -8px;
  }
  
  .dlist-align .text-dark.b strong {
    font-size: 20px;
    color: var(--primary-color);
  }
  
  .cart-card-body .text-center img {
    max-width: 100%;
    height: auto;
    opacity: 0.8;
  }
  
  .cart-card-body .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    margin-bottom: var(--spacing-sm);
  }
  
  .cart-card-body .btn-primary:hover {
    background: #7d5229;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .cart-card-body .btn-light {
    background: white;
    border: 2px solid var(--color-border);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    color: var(--color-grey);
    transition: var(--transition);
  }
  
  .cart-card-body .btn-light:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
  }
  
  .text-left.mt-0.mb-3 {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-light-grey);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
  }
  
  .text-left.mt-0.mb-3 span {
    font-size: 12px;
    color: var(--color-grey);
  }
  
  /* ========================================
     STICKY CHECKOUT BAR (MOBILE)
     ======================================== */
  .sticky-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: var(--spacing-md);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: block;
    border-top: 1px solid var(--color-border);
  }
  
  .sticky-checkout-bar .checkout-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
  }
  
  .sticky-checkout-bar .total-label {
    font-size: 14px;
    color: var(--color-grey);
    font-weight: 500;
  }
  
  .sticky-checkout-bar .total-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
  }
  
  .sticky-checkout-bar .btn-checkout {
    width: 100%;
    background: var(--primary-color);
    border: none;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 16px;
    color: white;
    transition: var(--transition);
  }
  
  .sticky-checkout-bar .btn-checkout:active {
    transform: scale(0.98);
    background: #7d5229;
  }
  
  /* ========================================
     ANIMATIONS
     ======================================== */
  @keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
  }
  
  .removing {
    animation: fadeOut 0.3s ease-out forwards;
  }
  
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .product-detailing-row {
    animation: slideUp 0.3s ease-out;
  }
  
  /* ========================================
     DESKTOP (992px+)
     ======================================== */
  @media (min-width: 992px) {
    .cart-block {
      padding-bottom: var(--spacing-lg);
    }
  
    .cart-block .my-container {
      padding: var(--spacing-lg);
    }
  
    #cart_body {
      background: white;
      border-radius: var(--border-radius);
      box-shadow: var(--shadow-sm);
    }
  
    .header-row {
      display: flex !important;
      align-items: center;
      padding: var(--spacing-md) var(--spacing-lg) var(--spacing-md) var(--spacing-md);
      background: #fafafa;
      border-radius: var(--border-radius) var(--border-radius) 0 0;
      margin-bottom: 0;
      font-weight: 600;
      color: var(--color-grey);
      font-size: 11px;
      letter-spacing: 1px;
      text-transform: uppercase;
      border-bottom: 2px solid var(--color-border);
    }
  
    .header-row > .col-lg-6 {
      flex: 0 0 62% !important;
      max-width: 62% !important;
      padding-left: 0 !important;
    }
  
    .header-row > .col-lg-2:nth-child(2) {
      flex: 0 0 15% !important;
      max-width: 15% !important;
      text-align: center;
    }
  
    .header-row > .col-lg-2:nth-child(3) {
      flex: 0 0 15% !important;
      max-width: 15% !important;
      text-align: center;
    }
  
    .header-row > .col-lg-2:nth-child(4) {
      flex: 0 0 8% !important;
      max-width: 8% !important;
      text-align: center;
    }
  
    .product-detailing-row {
      border-radius: 0;
      margin-bottom: 0;
      border-bottom: 1px solid var(--color-border);
      padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
      box-shadow: none;
      display: flex !important;
      align-items: center;
      min-height: 110px;
    }
  
    .product-detailing-row:last-child {
      border-radius: 0 0 var(--border-radius) var(--border-radius);
      border-bottom: none;
    }
  
    .product-detailing-row:hover {
      background: #fafafa;
    }
  
    .product-detailing-row:active {
      transform: none;
    }
  
    .product-detailing-row.row {
      margin-left: 0;
      margin-right: 0;
    }
  
    .product-detailing-row > .col-12.col-lg-6 {
      flex: 0 0 62% !important;
      max-width: 62% !important;
      padding: 0 var(--spacing-lg) 0 0 !important;
      margin-bottom: 0 !important;
    }
  
    .product-detailing-row figure.itemside {
      gap: var(--spacing-sm);
      align-items: center;
    }
  
    .product-detailing-row figure.itemside img.img-sm {
      width: 90px;
      height: 90px;
    }
  
    .product-detailing-row .title {
      font-size: 15px;
      font-weight: 500;
      display: block;
      -webkit-line-clamp: unset;
    }
  
    .product-detailing-row .text-muted.small {
      font-size: 12px;
      font-weight: 400;
    }
  
    .product-detailing-row > .col-12.quantity-row {
      flex: 0 0 15% !important;
      max-width: 15% !important;
      width: auto !important;
      display: flex !important;
      padding: 0 var(--spacing-sm) !important;
      margin-top: 0 !important;
      align-items: center;
      justify-content: center;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
  
    .product-detailing-row .input-group.input-spinner {
      max-width: 140px;
      margin: 0 auto;
    }
  
    .product-detailing-row > .col-12.price-row {
      flex: 0 0 15% !important;
      max-width: 15% !important;
      width: auto !important;
      display: flex !important;
      padding: 0 var(--spacing-sm) !important;
      margin-top: 0 !important;
      margin-left: 0 !important;
      text-align: center !important;
      align-items: center;
      justify-content: center;
    }
  
    .product-detailing-row .price-wrap {
      width: 100%;
      align-items: center;
    }
  
    .product-detailing-row .price-wrap .price {
      font-size: 16px;
    }
  
    .product-detailing-row .price-wrap small {
      font-size: 11px;
    }
  
    .product-detailing-row > .col-2.col-lg-2 {
      flex: 0 0 8% !important;
      max-width: 8% !important;
      position: static !important;
      width: auto !important;
      padding: 0 var(--spacing-sm) !important;
      display: flex !important;
      align-items: center;
      justify-content: center;
    }
  
    .product-detailing-row .btn-danger {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: transparent;
      border: 1px solid transparent;
      color: #94969f;
      opacity: 0.6;
    }
  
    .product-detailing-row .btn-danger:hover {
      transform: none;
      background: #fff0f0;
      border-color: #ffe0e0;
      color: var(--color-danger);
      opacity: 1;
    }
  
    .col-lg-4 .card {
      display: block !important;
      position: sticky;
      top: 20px;
    }
  
    .sticky-checkout-bar {
      display: none !important;
    }
  }
  
  /* ========================================
     LARGE DESKTOP (1200px+)
     ======================================== */
  @media (min-width: 1200px) {
    .product-detailing-row figure.itemside img.img-sm {
      width: 95px;
      height: 95px;
    }
  
    .product-detailing-row .title {
      font-size: 15px;
      font-weight: 500;
    }
  }
  
  /* ========================================
     SAVED FOR LATER - FIXED ALIGNMENT
     ======================================== */
  
  .cart-wl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
  }
  
  .cart-wl-item {
    width: 100%;
  }
  
  .cart-wl-card {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;     
    height: 100%;              
  }
  
  .cart-wl-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
  }
  
  .cart-wl-img-box {
    position: relative;
    background: #f5f5f5;
  }
  
  .cart-wl-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }
  
  /* Actions - FIXED ALIGNMENT */
  .cart-wl-img-box {
    position: relative;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .cart-wl-btn-add,
  .cart-wl-btn-remove {
    position: absolute;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    z-index: 2;
  }
  
  .cart-wl-btn-add {
    top: 8px;
    right: 8px;
    color: #996633;
  }
  
  .cart-wl-btn-remove {
    top: 52px;
    right: 8px;
    color: #EF4444;
  }
  
  .cart-wl-btn-add i,
  .cart-wl-btn-remove i {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }
  
  .cart-wl-btn-add:hover {
    background: #996633;
    color: white;
    transform: scale(1.1);
  }
  
  .cart-wl-btn-remove:hover {
    background: #EF4444;
    color: white;
    transform: scale(1.1);
  }
  
  .cart-wl-info {
    padding: 12px;
    display: flex;
    flex-direction: column;   
    flex: 1;                    
  }
  
  .cart-wl-name {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 6px 0;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
  }
  
  .cart-wl-name:hover {
    color: #996633;
    text-decoration: none;
  }
  
  .cart-wl-price {
    font-size: 18px;
    font-weight: 700;
    color: #996633;
    margin-bottom: 6px;
  }
  
  @media (min-width: 768px) {
    .cart-wl-grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }
  }
  
  @media (min-width: 992px) {
    .cart-wl-grid {
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
    }
    
    .cart-wl-img {
      height: 220px;
    }
  }
  
  @keyframes cartWlFadeOut {
    to {
      opacity: 0;
      transform: scale(0.9);
    }
  }