/* Shopping Cart Styles */
.cart-page {
  min-height: calc(100vh - 80px);
  padding: 0;
  background: #f8f9fa;
}

.cart-page h1 {
  margin: 95px 0 40px 0;
  padding: 0 20px;
  color: #081a30;
  font-size: 2.5rem;
}

/* Cart Content Grid */
.cart-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  margin: 30px 0;
  padding: 0 20px;
}

/* Cart Items Section */
.cart-items {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-header {
  display: grid;
  grid-template-columns: 100px 1fr 120px 140px 120px 40px;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  font-weight: 600;
  color: #6c757d;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Cart Item */
.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 120px 140px 120px 40px;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;
  align-items: center;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 100px;
  margin-right: 15px;
}

.cart-item-image img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8f9fa;
  display: block;
  margin-bottom: 4px;
}

.cart-item-image .cart-item-sku {
  font-size: 0.75rem;
  color: #333;
  font-weight: 600;
  margin: 0;
  padding: 2px 0;
  line-height: 1.3;
  word-break: break-word;
  max-width: 100px;
}

.cart-item-details h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: #081a30;
}


.cart-item-collection {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.cart-item-coverage {
  color: #6c757d;
  font-size: 0.85rem;
}

.cart-item-price {
  text-align: right;
}

.price-per-box {
  font-weight: 600;
  color: #081a30;
  margin-bottom: 5px;
}

.price-per-sqft {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Quantity Controls */
.cart-item-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #081a30;
  color: white;
  border-color: #081a30;
}

.qty-input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 1rem;
}

/* Cart Item Total */
.cart-item-total {
  text-align: right;
}

.line-total {
  font-weight: 600;
  color: #081a30;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.line-sqft {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Remove Button */
.cart-item-remove {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.cart-item-remove:hover {
  opacity: 0.7;
}

/* Cart Summary */
.cart-summary {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h2 {
  margin-bottom: 20px;
  color: #081a30;
  font-size: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.95rem;
}

.summary-row:last-of-type {
  border-bottom: none;
}

/* Shipping Selector */
.shipping-selector {
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;
}

.shipping-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
}

.shipping-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

/* Tax Row */
.tax-row {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Discount Section */
.discount-section {
  display: flex;
  gap: 10px;
  padding: 20px 0;
  border-bottom: 2px solid #e9ecef;
}

.discount-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Summary Total */
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #081a30;
  background: #fff;
}

.email-optin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: #333;
}

.email-optin input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #081a30;
  cursor: pointer;
}

/* Cart Actions */
.cart-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-block {
  width: 100%;
  text-align: center;
  padding: 12px 20px;
}

/* Empty Cart */
.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  background: white;
  border-radius: 12px;
  margin-top: 30px;
}

.empty-cart svg {
  stroke: #dee2e6;
  margin-bottom: 30px;
}

.empty-cart h2 {
  color: #495057;
  margin-bottom: 10px;
}

.empty-cart p {
  color: #6c757d;
  margin-bottom: 30px;
}

/* Mini Cart Styles */
.mini-cart-container {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  margin-top: 10px;
}

.mini-cart-container.show {
  opacity: 1;
  visibility: visible;
}

.mini-cart {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  width: 380px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.mini-cart-empty {
  padding: 40px;
  text-align: center;
  color: #6c757d;
}

.mini-cart-items {
  padding: 20px;
  overflow-y: auto;
  max-height: 320px;
}

.mini-cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.mini-cart-item:last-child {
  border-bottom: none;
}

.mini-cart-image {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
}

.mini-cart-details {
  flex: 1;
}

.mini-cart-name {
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.mini-cart-qty {
  color: #6c757d;
  font-size: 0.85rem;
}

.mini-cart-remove {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

.mini-cart-footer {
  padding: 20px;
  border-top: 2px solid #e9ecef;
}

.mini-cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.mini-cart-actions {
  display: flex;
  gap: 10px;
}

.mini-cart-actions .btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: #081a30;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.cart-notification.show {
  transform: translateX(0);
}

.cart-notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .cart-content {
    grid-template-columns: 1fr;
  }
  
  .cart-summary {
    position: static;
  }
  
  .cart-header,
  .cart-item {
    grid-template-columns: 80px 1fr 100px 120px 100px 30px;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .cart-header {
    display: none;
  }
  
  .cart-item {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
  }
  
  .cart-item-image {
    width: 100%;
    height: 200px;
  }
  
  .cart-item-quantity {
    justify-content: flex-start;
  }
  
  .cart-item-price,
  .cart-item-total {
    text-align: left;
  }
  
  .mini-cart {
    width: calc(100vw - 40px);
    right: 20px;
  }
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #081a30;
  color: white;
}

.btn-primary:hover {
  background: #0a2344;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 26, 48, 0.2);
}

.btn-secondary {
  background: white;
  color: #081a30;
  border: 2px solid #081a30;
}

.btn-secondary:hover {
  background: #081a30;
  color: white;
}

/* Cart Sidebar */
.cart-sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100001;
}

.cart-sidebar.open {
  display: block;
}

.cart-sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-sidebar-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cart-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}

.cart-sidebar-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #081a30;
}

.cart-sidebar-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.cart-sidebar-close:hover {
  color: #333;
}

.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-sidebar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 16px;
  text-align: center;
  color: #6c757d;
}

.cart-sidebar-empty p {
  margin: 0 0 16px;
  font-size: 15px;
}

.cart-sidebar-empty .cart-browse-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #081a30;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 28px;
  transition: background 0.2s;
}

.cart-sidebar-empty .cart-browse-btn:hover {
  background: #0a2344;
}

.cart-empty-featured {
  width: 100%;
  text-align: left;
}

.cart-empty-featured-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-bottom: 12px;
  padding: 0 4px;
}

.cart-empty-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-empty-product:last-child {
  border-bottom: none;
}

.cart-empty-product img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-empty-product-info {
  flex: 1;
  min-width: 0;
}

.cart-empty-product-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-empty-product-price {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
}

.cart-empty-product-add {
  flex-shrink: 0;
  padding: 6px 12px;
  background: #081a30;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.cart-empty-product-add:hover {
  background: #0a2344;
}

.cart-sidebar-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}

.cart-sidebar-item:last-child {
  border-bottom: none;
}

.cart-sidebar-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-sidebar-info {
  flex: 1;
  min-width: 0;
}

.cart-sidebar-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #081a30;
  margin-bottom: 2px;
}

.cart-sidebar-collection {
  font-size: 0.82rem;
  color: #6c757d;
  margin-bottom: 4px;
}

.cart-sidebar-price {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 8px;
}

.cart-sidebar-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-sidebar-qty .qty-btn {
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

.cart-sidebar-qty span {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-sidebar-remove {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 8px;
  text-decoration: underline;
}

.cart-sidebar-line-total {
  font-weight: 600;
  color: #081a30;
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.cart-sidebar-footer {
  border-top: 2px solid #e9ecef;
  padding: 20px 24px;
}

.cart-sidebar-totals {
  margin-bottom: 16px;
}

.cart-sidebar-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 6px;
}

.cart-sidebar-subtotal {
  font-size: 1.1rem;
  color: #081a30;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e9ecef;
}

.cart-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-sidebar-actions .btn-block {
  display: block;
  text-align: center;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .cart-sidebar-panel {
    width: 100vw;
    max-width: 100vw;
  }
}

/* You May Also Need */
.also-like-section {
  margin-top: 40px;
  padding: 30px 0;
}

.also-like-section h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: #081a30;
}

.also-like-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.also-like-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.also-like-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.also-like-link {
  flex-grow: 1;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.also-like-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.also-like-card .also-like-info {
  padding: 10px 12px;
}

.also-like-card .also-like-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #081a30;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.also-like-card .also-like-collection {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.also-like-card .also-like-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: #081a30;
}

.also-like-btn-add {
  background: #081a30;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 0 8px 8px;
  transition: background 0.2s;
}

.also-like-btn-add:hover {
  background: #0b2447;
}

.also-like-card .also-like-type {
  display: inline-block;
  font-size: 0.65rem;
  background: #e8f0fe;
  color: #1a5276;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .also-like-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}