/**
 * ProductCCA - Akira Theme Specific Styling
 *
 * This CSS file provides Akira theme-compatible styling for ProductCCA module
 * Matches Akira's design language and TouchSpin controls
 *
 * @version 1.0.1
 * @theme Akira
 */

/* ========================================
   PRODUCTCCA BLOCK - GENERAL
   ======================================== */
.mt-3 {
  margin-top: 1.8rem !important;
}

#productcca-block {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

#productcca-block .h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #232323;
  margin-bottom: 1rem;
}

/* ========================================
   PRODUCT ITEM CARDS
   ======================================== */

/* FORCE spacing between rows - ID-based specificity beats Bootstrap */
#productcca-block .productcca-product-item {
  margin-bottom: 2.5rem !important;
  padding: 1.5rem !important;
  border: 1px solid var(--ax-line-color, #E6E6E6) !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  transition: box-shadow 0.3s ease !important;
}

#productcca-block .productcca-product-item:not(:last-child) {
  margin-bottom: 2.5rem !important;
}

#productcca-block .productcca-product-item:last-child {
  margin-bottom: 0 !important;
}

/* Override ANY Bootstrap margin classes */
#productcca-block .productcca-product-item.mb-3,
#productcca-block .productcca-product-item.mb-2,
#productcca-block .productcca-product-item.mb-1 {
  margin-bottom: 2.5rem !important;
}

#productcca-block .productcca-product-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Product title matching Akira main product */
.productcca-product-item h5 {
  font-size: 1.8rem !important;
  line-height: 1.2 !important;
  font-weight: var(--font-weight-title, 700) !important;
  color: var(--color-title, #282828) !important;
  margin-bottom: 1rem !important;
}

.productcca-product-item h5 a {
  color: var(--color-title, #282828) !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
  font-weight: 600 !important;
}

.productcca-product-item h5 a:hover {
  color: #D90812 !important;
}

/* Product description short matching Akira */
.productcca-product-item .product-description-short {
  margin-bottom: 20px !important;
  color: var(--color-body, #7a7a7a) !important;
  font-size: var(--font-size-body, 1.4rem) !important;
  line-height: 1.5 !important;
}

.productcca-product-item .product-description-short p:last-child {
  margin-bottom: 0 !important;
}

.productcca-product-item .product-description-short.text-muted {
  color: var(--color-body, #7a7a7a) !important;
}

/* Product prices matching Akira - using ID-based specificity */
#productcca-block .productcca-product-item .product-pricing {
  margin-bottom: 20px !important;
}

#productcca-block .productcca-product-item .product-prices {
  margin-bottom: 0 !important;
}

#productcca-block .productcca-product-item .product-price {
  font-size: 2.2rem !important;
  line-height: 1.2 !important;
}

#productcca-block .productcca-product-item .current-price {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 10px !important;
}

#productcca-block .productcca-product-item .product__current-price,
#productcca-block .productcca-product-item .current-price-value {
  font-size: 1.8rem !important;
  line-height: 1.2 !important;
}

#productcca-block .productcca-product-item .product__regular-price,
#productcca-block .productcca-product-item .regular-price {
  font-size: 1.6rem !important;
  color: #999 !important;
  text-decoration: line-through !important;
}

#productcca-block .productcca-product-item .product__discount {
  font-size: 1.4rem !important;
  color: var(--color-price, #dc3545) !important;
  font-weight: 600 !important;
}

#productcca-block .productcca-product-item .product__unit-price,
#productcca-block .productcca-product-item .product-unit-price {
  font-size: 1.2rem !important;
  color: #7b858a !important;
  margin-bottom: 0 !important;
}

/* VAT label styling - now inside current-price div */
#productcca-block .productcca-product-item .tax-shipping-delivery-label {
  font-size: 1.2rem !important;
  color: #7b858a !important;
  font-weight: normal !important;
}

/* ========================================
   PRODUCT IMAGE
   ======================================== */

.productcca-product-item img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

/* ========================================
   PRODUCT DESCRIPTION
   ======================================== */

.productcca-row-description {
  color: #666;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.product-description-short {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #666;
}

/* ========================================
   SECTION HEADER STYLING
   ======================================== */

#productcca-block .productcca-section-header {
  margin-top: 5rem !important;
  margin-bottom: 1rem !important;
  padding-bottom: 1.5rem !important;
  }

#productcca-block .productcca-section-title {
  font-size: var(--font-size-h3, 2rem) !important;
  font-weight: var(--font-weight-title, 700) !important;
  color: var(--color-title, #282828) !important;
  text-transform: uppercase !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.2 !important;
}

#productcca-block .productcca-section-description {
  font-size: var(--font-size-body, 1.4rem) !important;
  color: var(--color-body, #7a7a7a) !important;
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
}

#productcca-block .productcca-section-description p {
  margin-bottom: 0.5rem !important;
}

#productcca-block .productcca-section-description p:last-child {
  margin-bottom: 0 !important;
}

/* First product closer to section header */
#productcca-block .productcca-section-header + .productcca-product-item,
#productcca-block .productcca-section-header ~ .productcca-product-item:first-of-type {
  margin-top: 1.5rem !important;
}

/* ========================================
   PRODUCT VARIANTS - AKIRA THEME STRUCTURE
   ======================================== */

/* Main variants container - closer spacing to label */
#productcca-block .productcca-product-item .product-variants {
  margin-bottom: 0.75rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100%;
}

/* Individual variant item (row) - flex layout for better control */
#productcca-block .productcca-product-item .product-variants-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 5px !important;
}

/* Control label (variant name) - flex layout with closer spacing */
#productcca-block .productcca-product-item .product-variants .control-label {
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 0 !important;
  padding-right: 10px !important;
  color: var(--color-label) !important;
  white-space: nowrap !important;
  font-weight: var(--font-weight-semi) !important;
  font-family: var(--font-family-semi) !important;
  min-width: auto !important;
  line-height: 30px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.productcca-product-item .product-variants .control-label::after {
  content: ':';
  margin-left: 2px;
}

/* Select container */
#productcca-block .productcca-product-item .product-variants .select-container {
  position: relative;
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
}

/* Select dropdowns - EXACT Akira theme styling */
#productcca-block .productcca-product-item .product-variants-item select.form-control {
  border: 1px solid var(--ax-line-color) !important;
  box-shadow: none !important;
  height: 34px !important;
  padding: 0 10px !important;
  margin: 2px !important;
  font-size: var(--font-size-body) !important;
  background-color: rgba(255, 255, 255, 0) !important;
  color: #232323 !important;
  border-radius: 0 !important;
  transition: all 0.2s ease !important;
  min-width: auto !important;
  width: auto !important;
}

.productcca-product-item .product-variants-item select.form-control:hover {
  border-color: #D90812;
}

.productcca-product-item .product-variants-item select.form-control:focus {
  outline: none;
  border-color: #D90812;
  box-shadow: 0 0 0 2px rgba(217, 8, 18, 0.1);
  background-color: rgba(217, 8, 18, 0.05);
  font-weight: 500;
}

/* Selected state for dropdowns */
.productcca-product-item .product-variants-item select.form-control.selected {
  background-color: rgba(217, 8, 18, 0.05);
  border-color: #D90812;
  font-weight: 500;
}

/* UL container for radio and color variants */
#productcca-block .productcca-product-item .product-variants-item ul {
  margin: 0;
  padding: 0;
  font-size: 0;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
  list-style: none;
  flex: 1 !important;
}

#productcca-block .productcca-product-item .product-variants-item ul li,
#productcca-block .productcca-product-item .product-variants > .product-variants-item ul li {
  line-height: 1 !important;
  margin: 0 !important;
  font-size: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Input container (for radio and color) */
.productcca-product-item .input-container {
  display: inline-block;
  position: relative;
}

.productcca-product-item .input-container label {
  margin: 0;
  cursor: pointer;
  display: inline-block;
}

/* Radio button variants */
.productcca-product-item .product-variants-item.type_radio .input-container {
  margin-right: 5px;
}

.productcca-product-item .input-radio {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

#productcca-block .productcca-product-item .radio-label {
  min-width: 32px !important;
  line-height: 30px !important;
  padding: 0 8px !important;
  text-align: center !important;
  font-weight: normal !important;
  border: 1px solid var(--ax-line-color) !important;
  color: var(--color-body) !important;
  font-size: 12px !important;
  box-shadow: none !important;
  display: inline-block !important;
  background: var(--ax-bg-wrapper) !important;
  -webkit-transition: all 0.2s ease-in-out 0s !important;
  -ms-transition: all 0.2s ease-in-out 0s !important;
  -moz-transition: all 0.2s ease-in-out 0s !important;
  -o-transition: all 0.2s ease-in-out 0s !important;
  transition: all 0.2s ease-in-out 0s !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

#productcca-block .productcca-product-item .radio-label:hover {
  border-color: #D90812 !important;
  background-color: rgba(217, 8, 18, 0.05) !important;
}

#productcca-block .productcca-product-item .input-radio:checked + .radio-label {
  background-color: #D90812 !important;
  border-color: #D90812 !important;
  color: #fff !important;
  font-weight: normal !important;
}

/* Color variants */
.productcca-product-item .product-variants-item.type_color .input-container {
  margin-right: 3px;
}

.productcca-product-item .input-color {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.productcca-product-item .color {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 2px solid #d6d4d4;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.productcca-product-item .color.texture {
  background-size: cover;
  background-repeat: no-repeat;
}

.productcca-product-item .input-color:checked + .color {
  border-color: #D90812;
  box-shadow: 0 0 0 2px rgba(217, 8, 18, 0.3);
}

.productcca-product-item .color:hover {
  border-color: #D90812;
}

/* Color tooltip */
.productcca-product-item .corlor-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d6d4d4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
  white-space: nowrap;
}

.productcca-product-item .input-container:hover .corlor-tooltip {
  display: block;
}

.productcca-product-item .bg-tooltip {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 1px solid #d6d4d4;
  margin-bottom: 5px;
  background-size: cover;
  background-position: center;
}

.productcca-product-item .name-tooltip {
  display: block;
  font-size: 12px;
  color: #232323;
  text-align: center;
}

/* ========================================
   PRODUCT ADD TO CART SECTION
   ======================================== */

.productcca-product-item .product-add-to-cart {
  margin-top: 0.5rem;
}

/* Minimal quantity message */
.productcca-product-item .product-minimal-quantity {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}

.productcca-product-item .product-minimal-quantity span {
  display: inline-block;
}

/* Product quantity section */
.productcca-product-item .product-quantity {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: wrap !important;
}

/* ========================================
   AKIRA QUANTITY CONTROLS - ProductCCA Structure
   ======================================== */

#productcca-block .productcca-product-item .qty {
  display: inline-block;
  flex-shrink: 0;
  width: 80px !important;
  min-width: 80px !important;
}

/* ProductCCA uses .quantity-button .input-group structure */
#productcca-block .productcca-product-item .quantity-button .input-group {
  display: inline-flex !important;
  position: relative !important;
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, .2) !important;
  border-radius: var(--ax-form-bi-rd, 0) !important;
  margin-bottom: 0 !important;
}

/* Quantity input - matching main product - MAXIMUM SPECIFICITY */
#productcca-block .productcca-product-item .quantity-button .input-group .form-control.js-quantity-wanted,
#productcca-block .productcca-product-item .quantity-button .form-control.js-quantity-wanted,
#productcca-block .productcca-product-item .quantity-button input.form-control.js-quantity-wanted,
#productcca-block .productcca-product-item .quantity-button input.js-quantity-wanted {
  height: 42px !important;
  padding: 0 10px !important;
  text-align: center !important;
  width: 80px !important;
  min-width: 80px !important;
  border: 1px solid var(--ax-line-color) !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: var(--color-title) !important;
  display: block !important;
  font-size: var(--font-size-body) !important;
  -webkit-transition: all 0.2s ease-in-out !important;
  -ms-transition: all 0.2s ease-in-out !important;
  transition: all 0.2s ease-in-out !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
  flex: 1 !important;
  margin: 0 !important;
}

#productcca-block .productcca-product-item .quantity-button .input-group .form-control.js-quantity-wanted::-webkit-outer-spin-button,
#productcca-block .productcca-product-item .quantity-button .input-group .form-control.js-quantity-wanted::-webkit-inner-spin-button,
#productcca-block .productcca-product-item .quantity-button .form-control.js-quantity-wanted::-webkit-outer-spin-button,
#productcca-block .productcca-product-item .quantity-button .form-control.js-quantity-wanted::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

#productcca-block .productcca-product-item .quantity-button .input-group .form-control.js-quantity-wanted:focus,
#productcca-block .productcca-product-item .quantity-button .form-control.js-quantity-wanted:focus {
  outline: none !important;
  border-color: #D90812 !important;
  box-shadow: 0 0 0 2px rgba(217, 8, 18, 0.1) !important;
}

/* Decrement and Increment buttons - matching theme exactly */
#productcca-block .productcca-product-item .quantity-button .btn.decrement,
#productcca-block .productcca-product-item .quantity-button .btn.increment {
  height: 42px !important;
  width: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #fff !important;
  border: 1px solid var(--ax-line-color) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: var(--color-title, #282828) !important;
  font-size: 1.6rem !important;
}

#productcca-block .productcca-product-item .quantity-button .btn.decrement:hover,
#productcca-block .productcca-product-item .quantity-button .btn.increment:hover {
  background-color: #D90812 !important;
  color: var(--color-btn-hover, #ffffff) !important;
}

#productcca-block .productcca-product-item .quantity-button .btn.decrement:active,
#productcca-block .productcca-product-item .quantity-button .btn.increment:active {
  background-color: #D90812 !important;
  opacity: 0.9 !important;
}

/* Decrement button - left side with border-radius */
#productcca-block .productcca-product-item .quantity-button .btn.decrement {
  border-radius: var(--ax-form-bi-rd) 0 0 var(--ax-form-bi-rd) !important;
  border-right: none !important;
}

/* Increment button - right side with border-radius */
#productcca-block .productcca-product-item .quantity-button .btn.increment {
  border-radius: 0 var(--ax-form-bi-rd) var(--ax-form-bi-rd) 0 !important;
  border-left: none !important;
}

/* Material Icons inside buttons */
#productcca-block .productcca-product-item .quantity-button .material-icons {
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Additional theme compatibility - input-group-btn-vertical buttons */
#productcca-block .productcca-product-item .product-quantity .input-group-btn-vertical .btn {
  height: auto !important;
  padding: 0 !important;
  border-color: var(--ax-line-color) !important;
  margin: 0 !important;
  position: absolute !important;
  z-index: 3 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 25px !important;
  border-radius: 0 !important;
  border: 1px solid var(--ax-line-color) !important;
}

/* Bootstrap touchspin compatibility for ProductCCA */
#productcca-block .productcca-product-item .bootstrap-touchspin input.form-control,
#productcca-block .productcca-product-item .bootstrap-touchspin input.input-group {
  background-color: unset !important;
  border: 1px solid var(--ax-line-color) !important;
  color: var(--color-title) !important;
  display: block !important;
  font-size: var(--font-size-body) !important;
  height: 45px !important;
  padding: 0 30px !important;
  padding-right: 31px !important;
  -webkit-transition: all 0.2s ease-in-out !important;
  -ms-transition: all 0.2s ease-in-out !important;
  transition: all 0.2s ease-in-out !important;
  width: 100% !important;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.08) inset !important;
}

/* ========================================
   ADD TO CART BUTTON SECTION
   ======================================== */

.productcca-product-item .add {
  flex-grow: 1;
  display: inline-block;
}

/* Buttons */
.productcca-product-item .btn {
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

/* Add to cart button matching Akira - EXACT styling */
#productcca-block .productcca-product-item .add-to-cart.btn.btn-primary,
#productcca-block .productcca-product-item .btn-primary {
  background-color: #D90812 !important;
  border-color: #D90812 !important;
  color: var(--color-btn, #ffffff) !important;
  padding: 0.625rem 1.5rem !important;
  font-size: 1.3rem !important;
  line-height: 20px !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  border-radius: 0 !important;
  transition: all 0.3s ease !important;
  width: 100% !important;
  height: 42px !important;
}

.productcca-product-item .add-to-cart.btn.btn-primary:hover,
.productcca-product-item .btn-primary:hover {
 color: var(--color-btn-hover) !important;
  background-color: var(--bg-color-btn-hover) !important;
  border-color: var(--bg-color-btn-hover) !important;
  
}

.productcca-product-item .btn-primary:disabled {
  background-color: #ccc !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  transform: none !important;
}

.productcca-product-item .btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
  padding: 0.625rem 1.5rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
}

.productcca-product-item .btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
}

.productcca-product-item .btn .material-icons {
  margin-right: 0.25rem;
  font-size: 18px;
}

/* ========================================
   VOLUME DISCOUNTS TABLE
   ======================================== */

.productcca-product-item .product__discounts {
  margin-bottom: 1rem;
}

.productcca-product-item .product__discounts .h6 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.productcca-product-item .product__discounts table {
  font-size: 0.875rem;
}

.productcca-product-item .product__discounts th {
  background-color: #f8f8f8;
  font-weight: 600;
  padding: 0.5rem;
  border: 1px solid #e8e8e8;
}

.productcca-product-item .product__discounts td {
  padding: 0.5rem;
  border: 1px solid #e8e8e8;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .productcca-product-item {
    padding: 1rem !important;
  }
  
  /* Center product image on mobile */
  #productcca-block .productcca-product-item .col-md-3 {
    text-align: center !important;
    margin-bottom: 1rem !important;
  }
  
  #productcca-block .productcca-product-item .col-md-3 img {
    max-width: 200px !important;
    margin: 0 auto !important;
  }
  
  /* Variants layout - label above values, aligned left */
  #productcca-block .productcca-product-item .product-variants-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
    margin-bottom: 10px !important;
  }
  
  #productcca-block .productcca-product-item .product-variants .control-label {
    width: 100% !important;
    text-align: left !important;
    padding-right: 0 !important;
    margin-bottom: 5px !important;
  }
  
  #productcca-block .productcca-product-item .product-variants .select-container,
  #productcca-block .productcca-product-item .product-variants-item ul {
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  #productcca-block .productcca-product-item .product-variants-item select.form-control {
    width: 100% !important;
  }
  
  /* Quantity and Add to Cart inline on mobile */
  .productcca-product-item .product-quantity {
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
  }
  
  .productcca-product-item .qty {
    width: auto !important;
    flex-shrink: 0 !important;
  }
  
  #productcca-block .productcca-product-item .quantity-button .input-group {
    width: 120px !important;
    min-width: 120px !important;
  }
  
  .productcca-product-item .add {
    flex: 1 !important;
    width: auto !important;
  }
  
  #productcca-block .productcca-product-item .add-to-cart.btn.btn-primary {
    width: 100% !important;
  }
  
  .productcca-product-item .product__current-price {
    font-size: 1.25rem;
  }
  
  .productcca-product-item .product-minimal-quantity {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  #productcca-block .h4 {
    font-size: 1.25rem;
  }
  
  .productcca-product-item h5 {
    font-size: 1rem;
  }
  
  .productcca-product-item .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.productcca-product-item .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.productcca-product-item *:focus-visible {
  outline: 2px solid #232323;
  outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .productcca-product-item .product-actions {
    display: none;
  }
  
  .productcca-product-item {
    border: 1px solid #000 !important;
    page-break-inside: avoid;
  }
}

/* End of ProductCCA Akira Theme Styles */

