.cof-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Updated category tabs with brand colors */
.cof-category-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 30px;
  border-bottom: 3px solid #e8e8e8;
  overflow-x: auto;
  padding-bottom: 0;
  background: #fafafa;
  padding: 10px 10px 0;
  border-radius: 8px 8px 0 0;
}

.cof-tab-link {
  padding: 14px 28px;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
  white-space: nowrap;
  border-radius: 6px 6px 0 0;
  position: relative;
  bottom: -3px;
}

.cof-tab-link:hover {
  color: #005095;
  background: #f0f0f0;
}

.cof-tab-link.active {
  color: #005095;
  background: #fff;
  border-bottom-color: #f67b23;
  font-weight: 700;
}

/* Removed sidebar and updated main layout for full-width products */
.cof-products-content {
  width: 100%;
  max-width: 100%;
}

.cof-products-cart-wrapper {
  display: block;
}

.cof-sidebar {
  display: none;
}

.cof-sidebar-right {
  display: none;
}

.cof-main-content {
  width: 100%;
  max-width: 100%;
}

/* Improved layout with better spacing and shadows */
.cof-products-cart-wrapper {
  display: flex;
  gap: 25px;
}

#cof-products-section {
  display: block;
}

.cof-sidebar-left {
  display: none;
}

.cof-sidebar {
  flex: 0 0 280px;
}

.cof-sidebar-right {
  position: sticky;
  top: 20px;
  align-self: flex-start;
}

.cof-main-content {
  flex: 1;
  min-width: 0;
}

#cof-checkout-section {
  max-width: 1200px;
  margin: 0 auto;
}

.cof-checkout-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.cof-checkout-form-wrapper {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cof-checkout-summary-wrapper {
  flex: 0 0 350px;
  position: sticky;
  top: 20px;
}

.cof-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cof-category-list li {
  margin-bottom: 5px;
}

.cof-category-link {
  display: block;
  padding: 10px 15px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.cof-category-link:hover,
.cof-category-link.active {
  background: #333;
  color: #fff;
}

.cof-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.cof-product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background: #fff;
  transition: box-shadow 0.3s;
}

.cof-product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 80, 149, 0.15);
}

.cof-product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 5px;
  margin-bottom: 15px;
}

.cof-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cof-product-info h4 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.cof-product-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

/* Updated product price with primary brand color */
.cof-product-price {
  font-size: 20px;
  font-weight: bold;
  color: #005095;
  margin: 10px 0;
}

.cof-quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Updated quantity input focus states with brand colors */
.cof-quantity-input {
  width: 90px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: #fff;
}

.cof-quantity-input:focus {
  outline: none;
  border-color: #005095;
  box-shadow: 0 0 0 3px rgba(0, 80, 149, 0.1);
}

.cof-quantity-input:hover {
  border-color: #005095;
}

/* Updated product table header with brand gradient */
.cof-products-table-wrapper {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cof-products-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.cof-products-table thead {
  background: linear-gradient(135deg, #005095 0%, #003d73 100%);
  border-bottom: 3px solid #002952;
}

.cof-products-table th {
  padding: 18px 15px;
  text-align: left;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.cof-product-row {
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.cof-product-row:hover {
  background: #f0f7fc;
  box-shadow: 0 2px 4px rgba(0, 80, 149, 0.1);
}

.cof-products-table td {
  padding: 18px 15px;
  vertical-align: middle;
}

.cof-product-details {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cof-product-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 2px solid #f0f0f0;
}

.cof-product-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
  color: #222;
}

.cof-product-text p {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* Updated customizable badge with brand colors */
.cof-customizable-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f67b23 0%, #d86a1e 100%);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Added styling for minimum quantity badge */
.cof-min-qty-badge {
  display: inline-block;
  background: linear-gradient(135deg, #005095 0%, #003d73 100%);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  margin-top: 6px;
  margin-left: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Updated price and total cells with brand color */
.cof-price-cell {
  font-weight: 700;
  color: #005095;
  font-size: 17px;
}

.cof-total-cell {
  font-weight: 700;
  font-size: 17px;
}

.cof-product-total {
  color: #005095;
}

/* Added modal styles for customizations */
/* Enhanced modal with better animations */
.cof-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

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

.cof-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Updated modal header with brand color gradient */
.cof-modal-header {
  padding: 24px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f0f7fc 0%, #fff 100%);
}

.cof-modal-header h3 {
  margin: 0;
  color: #005095;
  font-size: 20px;
  font-weight: 700;
}

.cof-modal-close {
  background: #f0f0f0;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 5px;
  width: 36px;
  height: 36px;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.cof-modal-close:hover {
  background: #e0e0e0;
  color: #333;
  transform: rotate(90deg);
}

.cof-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cof-modal-body p {
  margin-top: 0;
  font-size: 15px;
  color: #555;
}

#cof-customization-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Updated customization options with brand colors */
.cof-customization-option {
  display: flex;
  align-items: center;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.cof-customization-option:hover {
  border-color: #005095;
  background: #f0f7fc;
  transform: translateX(2px);
}

.cof-customization-option input[type="checkbox"] {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #005095;
}

.cof-customization-option.selected {
  border-color: #005095;
  background: #e6f2ff;
  box-shadow: 0 2px 8px rgba(0, 80, 149, 0.15);
}

.cof-modal-footer {
  padding: 20px 24px;
  border-top: 2px solid #f0f0f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #fafafa;
}

.cof-modal-footer .cof-btn {
  margin: 0;
  width: auto;
  padding: 12px 24px;
}

/* Updated cart sidebar with brand color accents */
.cof-cart-sticky {
  background: linear-gradient(135deg, #fff 0%, #f0f7fc 100%);
  padding: 24px;
  border-radius: 12px;
  border: 2px solid #e8e8e8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cof-cart-sticky h3 {
  margin-top: 0;
  color: #005095;
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 15px;
  border-bottom: 3px solid #f67b23;
}

.cof-empty-cart {
  color: #999;
  text-align: center;
  padding: 30px 0;
  font-size: 15px;
}

/* Added styling for customizations in cart */
.cof-cart-customizations {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
  line-height: 1.5;
}

.cof-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.cof-cart-item-name {
  flex: 1;
  font-weight: 500;
}

.cof-cart-item-qty {
  margin: 0 10px;
  color: #666;
}

.cof-cart-item-price {
  font-weight: bold;
}

.cof-cart-item-remove {
  background: #d9534f;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 5px 10px;
  cursor: pointer;
  margin-left: 10px;
}

/* Updated cart totals styling to show breakdown */
#cof-cart-category-totals {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid #e8e8e8;
}

.cof-category-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15px;
  color: #333;
}

.cof-category-total-name {
  font-weight: 600;
}

/* Updated category total amount with brand color */
.cof-category-total-amount {
  color: #005095;
  font-weight: 700;
}

.cof-cart-totals {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px solid #e8e8e8;
}

.cof-cart-subtotal,
.cof-cart-vat {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 16px;
  color: #555;
}

/* Updated cart total with brand colors */
.cof-cart-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  margin-top: 10px;
  border-top: 3px solid #005095;
  font-size: 20px;
  color: #005095;
}

/* Updated button styling */
/* Improved button styling with hover effects */
.cof-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cof-btn-primary {
  background: linear-gradient(135deg, #005095 0%, #003d73 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 80, 149, 0.3);
}

.cof-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #003d73 0%, #002952 100%);
  box-shadow: 0 6px 16px rgba(0, 80, 149, 0.4);
  transform: translateY(-2px);
}

.cof-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.cof-btn-secondary {
  background: #6c757d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.cof-btn-secondary:hover {
  background: #5a6268;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
  transform: translateY(-2px);
}

/* Form styling */
/* Enhanced form styling */
.cof-form-group {
  margin-bottom: 22px;
}

.cof-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.cof-form-group input,
.cof-form-group textarea,
.cof-form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-family: inherit;
  background: #fff;
}

/* Updated form focus states with brand color */
.cof-form-group input:focus,
.cof-form-group textarea:focus,
.cof-form-group select:focus {
  outline: none;
  border-color: #005095;
  box-shadow: 0 0 0 3px rgba(0, 80, 149, 0.1);
}

/* Added inline form validation error styling */
.cof-field-error {
  display: block;
  color: #d9534f;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cof-field-error.visible {
  opacity: 1;
  min-height: 18px;
}

.cof-field-error-input {
  border-color: #d9534f !important;
  background: #fff5f5;
}

.cof-field-error-input:focus {
  border-color: #d9534f !important;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15) !important;
}

.cof-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cof-form-actions {
  display: flex;
  gap: 15px;
  margin-top: 35px;
}

.cof-form-actions .cof-btn {
  margin-top: 0;
}

.cof-success-box {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
}

.cof-success-box h2 {
  color: #155724;
  margin-top: 0;
}

/* Category totals styling in cart summary */
/* Detailed checkout items with expandable customizations */
/* Enhanced checkout item display */
.cof-checkout-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 15px 0;
}

.cof-checkout-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cof-checkout-item-details {
  flex: 1;
}

.cof-checkout-item-name {
  font-weight: 700;
  font-size: 16px;
  display: block;
  margin-bottom: 5px;
  color: #222;
}

.cof-checkout-item-qty {
  color: #666;
  font-size: 14px;
}

/* Updated checkout item price with brand color */
.cof-checkout-item-price {
  font-weight: 700;
  font-size: 17px;
  color: #005095;
}

/* Updated customization toggle with brand color */
.cof-customizations-toggle {
  background: none;
  border: none;
  color: #005095;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 0;
  text-decoration: underline;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.cof-customizations-toggle:hover {
  color: #003d73;
}

/* Updated customizations content with brand color accent */
.cof-customizations-content {
  margin-top: 10px;
  padding: 12px;
  background: #f0f7fc;
  border-radius: 6px;
  border-left: 3px solid #f67b23;
  font-size: 13px;
  display: none;
}

.cof-customizations-content.open {
  display: block;
}

.cof-customizations-content ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.cof-customizations-content li {
  margin: 5px 0;
  color: #555;
  line-height: 1.6;
}

.cof-success-box {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid #a3d6ac;
  border-radius: 12px;
  padding: 50px;
  text-align: center;
  max-width: 650px;
  margin: 50px auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cof-success-box h2 {
  color: #155724;
  margin-top: 0;
  font-size: 32px;
}

/* Updated checkout form header with brand color */
.cof-checkout-form-wrapper h2 {
  color: #005095;
  font-size: 26px;
  margin-top: 0;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #e8e8e8;
}

/* New card-based product layout with full-width details */
.cof-products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 100px;
}

/* Updated product card hover with brand color shadow */
.cof-product-card {
  background: #fff;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cof-product-card:hover {
  box-shadow: 0 6px 20px rgba(0, 80, 149, 0.15);
  transform: translateY(-2px);
  border-color: #005095;
}

.cof-product-header {
  padding: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.cof-product-details {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.cof-product-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 2px solid #f0f0f0;
}

.cof-product-text {
  flex: 1;
}

.cof-product-text strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  color: #222;
  line-height: 1.3;
}

.cof-product-text p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Three column footer layout for quantity, price, and total */
.cof-product-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 0;
  background: #fafafa;
}

.cof-product-col {
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid #e8e8e8;
}

.cof-product-col:last-child {
  border-right: none;
}

.cof-product-col label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* Updated price and total values with brand color */
.cof-price-value,
.cof-total-value {
  font-size: 20px;
  font-weight: 700;
  color: #005095;
}

.cof-quantity-input {
  width: 100%;
  max-width: 90px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: #fff;
}

/* Fixed bottom summary bar on products page */
/* Updated bottom summary bar with brand gradient */
.cof-bottom-summary-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #005095 0%, #003d73 100%);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 15px 20px;
}

.cof-bottom-summary-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cof-bottom-summary-total {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.cof-grand-total {
  font-size: 28px;
  font-weight: 700;
}

/* Updated bottom bar button with accent color */
.cof-bottom-summary-bar .cof-btn {
  margin: 0;
  width: auto;
  padding: 14px 35px;
  background: #f67b23;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.cof-bottom-summary-bar .cof-btn:hover:not(:disabled) {
  background: #d86a1e;
  transform: translateY(-2px);
}

.cof-bottom-summary-bar .cof-btn:disabled {
  background: #ccc;
  color: #666;
}

/* Added styling for button tooltip */
/* Complete tooltip styles - properly hidden by default, only visible on hover when has-errors class present */
.cof-proceed-btn-wrapper {
  position: relative;
  display: inline-block;
}

/* Complete tooltip styling with proper hover behavior */
.cof-button-tooltip {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Arrow pointer for tooltip */
.cof-button-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* Only show tooltip on hover when wrapper has has-errors class */
.cof-proceed-btn-wrapper.has-errors:hover .cof-button-tooltip {
  opacity: 1;
  visibility: visible;
}
