/* Rafz Shop CSS - Single Page Application */

/* Common Components */
.rafz-loading {
  text-align: center;
  padding: 40px 20px;
}

.rafz-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.rafz-error {
  text-align: center;
  padding: 40px 20px;
  background: #ffebee;
  border: 1px solid #f44336;
  border-radius: 8px;
  margin: 20px 0;
}

.rafz-error p {
  color: #d32f2f;
  margin: 0 0 20px;
}

/* Buttons */
.rafz-btn,
.rafz-add-to-cart-btn,
.rafz-add-to-cart-single,
.rafz-proceed-to-checkout,
.rafz-complete-order,
.rafz-load-more-btn,
.rafz-retry-btn,
.rafz-back-btn,
.rafz-continue-shopping,
.rafz-back-to-cart,
.rafz-single-product-back {
  background: #4caf50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.rafz-btn:hover,
.rafz-add-to-cart-btn:hover,
.rafz-add-to-cart-single:hover,
.rafz-proceed-to-checkout:hover,
.rafz-complete-order:hover,
.rafz-load-more-btn:hover,
.rafz-retry-btn:hover,
.rafz-continue-shopping:hover,
.rafz-back-to-cart:hover,
.rafz-single-product-back:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.rafz-btn:disabled,
.rafz-add-to-cart-btn:disabled,
.rafz-add-to-cart-single:disabled,
.rafz-load-more-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Category item layout improvements */
.rafz-category-content {
  width: 100%;
}

/* Products Grid */
.rafz-products-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.rafz-products-grid.rafz-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.rafz-products-grid.rafz-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.rafz-products-grid.rafz-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.rafz-products-grid.rafz-columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.rafz-product-item {
  background: white;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rafz-product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.rafz-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rafz-product-item:hover .rafz-product-image img {
  transform: scale(1.05);
}

.rafz-sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f44336;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.rafz-product-content {
  padding: 15px;
}

.rafz-product-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #333;
  line-height: 1.4;
}

.rafz-product-price {
  margin-bottom: 10px;
}

.rafz-price,
.rafz-sale-price {
  font-size: 18px;
  font-weight: bold;
  color: #4caf50;
}

.rafz-regular-price {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}

.rafz-product-excerpt {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rafz-product-actions {
  display: flex;
  gap: 10px;
}

.rafz-product-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
}

/* Result Count */
.rafz-result-count {
  text-align: center;
  margin: 20px 0;
  color: #666;
  font-size: 14px;
}

/* Load More */
.rafz-load-more {
  text-align: center;
  margin: 40px 0;
}

/* Single Product */
.rafz-single-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

.rafz-product-gallery {
  display: grid;
  gap: 10px;
}

.rafz-product-gallery-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rafz-product-info {
  padding: 20px 0;
}

.rafz-product-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #333;
}

.rafz-product-price {
  font-size: 24px;
  margin-bottom: 20px;
}

.rafz-product-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 30px;
}

.rafz-product-form {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.rafz-quantity-wrapper {
  margin-bottom: 20px;
}

.rafz-quantity-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.rafz-quantity-input {
  width: 60px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.rafz-product-full-description {
  border-top: 1px solid #eee;
  padding-top: 30px;
  margin-top: 30px;
}

.rafz-product-meta {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
}

/* Cart */
.rafz-cart-header,
.rafz-checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.rafz-continue-shopping,
.rafz-back-to-cart {
  text-decoration: none;
  font-weight: 500;
}

.rafz-continue-shopping:hover,
.rafz-back-to-cart:hover {
  text-decoration: underline;
}

.rafz-cart-items {
  margin-bottom: 30px;
}

.rafz-cart-totals {
  text-align: right;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.rafz-cart-total {
  font-size: 20px;
  margin-bottom: 20px;
}

/* Checkout */
.rafz-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

.rafz-checkout-form,
.rafz-order-summary {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rafz-checkout-form h3,
.rafz-order-summary h3 {
  margin: 0 0 20px;
  font-size: 20px;
  color: #333;
}

.rafz-billing-form {
  display: grid;
  gap: 15px;
}

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

.rafz-billing-form input,
.rafz-billing-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
}

.rafz-billing-form textarea {
  resize: vertical;
  min-height: 100px;
}

.rafz-order-items {
  margin-bottom: 20px;
}

.rafz-order-total {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Notifications */
.rafz-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

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

.rafz-notification-success {
  background: #4caf50;
}

.rafz-notification-error {
  background: #f44336;
}

.rafz-notification-info {
  background: #2196f3;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rafz-shop-wrapper,
  .rafz-cart-wrapper,
  .rafz-checkout-wrapper,
  .rafz-single-product {
    padding: 10px;
  }

  .rafz-categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .rafz-products-grid.rafz-columns-2,
  .rafz-products-grid.rafz-columns-3,
  .rafz-products-grid.rafz-columns-4,
  .rafz-products-grid.rafz-columns-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .rafz-single-product-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rafz-checkout-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rafz-form-row {
    grid-template-columns: 1fr;
  }

  .rafz-shop-header,
  .rafz-cart-header,
  .rafz-checkout-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .rafz-product-actions {
    flex-direction: column;
  }

  .rafz-notification {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    transform: translateY(-100%);
  }

  .rafz-notification-show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .rafz-products-grid.rafz-columns-2,
  .rafz-products-grid.rafz-columns-3,
  .rafz-products-grid.rafz-columns-4,
  .rafz-products-grid.rafz-columns-5 {
    grid-template-columns: 1fr;
  }

  .rafz-product-title {
    font-size: 24px;
  }

  .rafz-product-price {
    font-size: 20px;
  }

  .rafz-checkout-form,
  .rafz-order-summary {
    padding: 20px;
  }
}

/* Rafz Shop CSS - Single Page Application */

/* Base Styles */
.rafz-shop-wrapper {
  width: 100%;
  margin: 0;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

.rafz-shop {
  margin: 0 auto;
  width: 100%;
}

/* Navigation */
.rafz-shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.rafz-cart-summary {
  margin-left: auto;
}

.rafz-breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
}

.rafz-breadcrumb-home {
  color: #4caf50;
  cursor: pointer;
  font-weight: 500;
}

.rafz-breadcrumb-home:hover {
  color: #45a049;
}

.rafz-breadcrumb-separator {
  margin: 0 8px;
  color: #999;
}

.rafz-breadcrumb-category {
  color: #333;
  font-weight: 500;
}

.rafz-breadcrumb-link {
  color: #4caf50;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.rafz-breadcrumb-link:hover {
  color: #45a049;
  text-decoration: none;
}

.rafz-cart-link {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  padding: 8px;
}

.rafz-cart-link:hover {
  opacity: 0.8;
}

.rafz-cart-icon {
  width: 24px;
  height: 24px;
  color: #333;
}

.rafz-cart-icon svg {
  width: 100%;
  height: 100%;
}

.rafz-cart-count {
  background: #f44336;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  text-align: center;
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Categories Grid */
.rafz-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px 20px;
  margin-top: 0px;
  padding-bottom: 10px;
}

.rafz-category-item {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  user-select: none;
}

.rafz-category-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 15px;
}

.rafz-category-icon {
  margin-bottom: 10px;
}

.rafz-category-icon img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.rafz-placeholder-image {
  font-size: 48px;
  color: white;
}

.rafz-category-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
  text-align: left;
}

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

.rafz-category-subcategories li {
  color: #666;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  line-height: 1.4;
}

.rafz-category-subcategories li:hover {
  color: #4caf50;
  padding-left: 10px;
}

.rafz-category-subcategories li:last-child {
  border-bottom: none;
}

.rafz-category-content {
  margin-top: 15px;
}

/* Products Grid */
.rafz-products-grid {
  display: grid;
  gap: 30px;
  margin-top: 30px;
}

.rafz-products-grid .rafz-col-2 {
  grid-template-columns: repeat(2, 1fr);
}

.rafz-products-grid .rafz-col-3 {
  grid-template-columns: repeat(3, 1fr);
}

.rafz-products-grid .rafz-col-4 {
  grid-template-columns: repeat(4, 1fr);
}

.rafz-products-grid .rafz-col-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Dynamic column classes */
.rafz-shop[data-columns='2'] .rafz-products-grid {
  grid-template-columns: repeat(2, 1fr);
}

.rafz-shop[data-columns='3'] .rafz-products-grid {
  grid-template-columns: repeat(3, 1fr);
}

.rafz-shop[data-columns='4'] .rafz-products-grid {
  grid-template-columns: repeat(4, 1fr);
}

.rafz-shop[data-columns='5'] .rafz-products-grid {
  grid-template-columns: repeat(5, 1fr);
}

.rafz-product-item {
  background: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rafz-product-image {
  position: relative;
  margin-bottom: 15px;
}

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

.rafz-sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff5722;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.rafz-product-info {
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.rafz-product-info-container {
  padding: 0px 12px;
}

.rafz-product-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px;
  line-height: 1.3;
}

.rafz-product-price {
  margin: 2px 0;
  font-weight: 600;
}

.rafz-price {
  color: #4caf50;
  font-size: 18px;
}

.rafz-sale-price {
  color: #ff5722;
  font-size: 18px;
  margin-right: 8px;
}

.rafz-regular-price {
  color: #999;
  text-decoration: line-through;
  font-size: 14px;
}

.rafz-product-actions {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  gap: 10px;
}

.rafz-product-actions button {
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  background: #f5f5f5;
  border: none;
  color: #333;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 0;
}

.rafz-product-actions button:hover {
  background: #e0e0e0;
}

.rafz-product-actions button:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.rafz-product-sku {
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
  font-weight: 500;
}

.rafz-product-stock {
  font-size: 12px;
  color: #4caf50;
  margin-bottom: 2px;
  font-weight: 600;
}

.rafz-product-stock.rafz-out-of-stock {
  color: #f44336;
}

.rafz-result-count {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: left;
}

.rafz-load-more {
  text-align: center;
  margin-top: 40px;
}

.rafz-load-more-btn .rafz-spinner {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #4caf50;
  border-radius: 50%;
  animation: rafz-button-spin 0.8s linear infinite;
}

@keyframes rafz-button-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Single Product View */
.rafz-single-product-container {
  max-width: 1200px;
  margin: 0 auto;
}

.rafz-single-product-header {
  margin-bottom: 30px;
}

.rafz-single-product-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.rafz-single-product-images {
  position: sticky;
  top: 20px;
}

.rafz-main-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rafz-single-product-details {
  padding: 20px 0;
}

.rafz-product-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0 0 20px;
  line-height: 1.3;
}

.rafz-product-price-single {
  margin: 20px 0;
  font-weight: 600;
}

.rafz-product-price-single .rafz-price {
  font-size: 24px;
  color: #4caf50;
}

.rafz-product-price-single .rafz-sale-price {
  font-size: 24px;
  color: #ff5722;
  margin-right: 12px;
}

.rafz-price-tax-notice {
  font-size: 14px;
  color: #666;
  font-weight: 300;
  margin-top: 5px;
  font-style: italic;
}

.rafz-product-stock-info {
  font-size: 14px;
  color: #4caf50;
  font-weight: 600;
  margin: 10px 0;
}

.rafz-product-stock-info.rafz-out-of-stock {
  color: #f44336;
}

.rafz-product-summary {
  color: #666;
  line-height: 1.6;
  margin: 20px 0;
  font-size: 16px;
}

.rafz-product-add-to-cart {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  margin: 30px 0;
}

.rafz-quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.rafz-quantity-selector label {
  font-weight: 600;
  color: #333;
}

.rafz-quantity-input {
  width: 80px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
}

.rafz-add-to-cart-single {
  background: #4caf50;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rafz-add-to-cart-single:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.rafz-product-description {
  margin-top: 40px;
  color: #333;
  line-height: 1.6;
}

.rafz-product-description h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

/* Cart View */
.rafz-cart-view {
  max-width: 900px;
  margin: 0 auto;
}

.rafz-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.rafz-cart-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.rafz-cart-content {
  background: white;
}

/* Empty Cart */
.rafz-cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.rafz-cart-empty h3 {
  font-size: 24px;
  color: #333;
  margin: 0 0 15px;
}

.rafz-cart-empty p {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
}

/* Cart Items */
.rafz-cart-items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 50px;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 2px solid #eee;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.rafz-cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 50px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.rafz-cart-item-product {
  display: flex;
  align-items: center;
  gap: 15px;
}

.rafz-cart-item-image {
  flex-shrink: 0;
}

.rafz-cart-item-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.rafz-cart-item-details {
  flex: 1;
}

.rafz-cart-item-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px;
  line-height: 1.3;
}

.rafz-cart-item-price {
  font-size: 14px;
}

.rafz-cart-item-price .rafz-sale-price {
  color: #ff5722;
  font-weight: 600;
  margin-right: 8px;
}

.rafz-cart-item-price .rafz-regular-price {
  color: #999;
  text-decoration: line-through;
}

.rafz-cart-item-price .rafz-price {
  color: #4caf50;
  font-weight: 600;
}

.rafz-cart-item-quantity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rafz-cart-item-quantity label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.rafz-cart-quantity {
  width: 60px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

.rafz-cart-item-total {
  text-align: center;
}

.rafz-line-total {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.rafz-cart-item-remove {
  text-align: center;
}

.rafz-remove-cart-item {
  background: #f44336;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.rafz-remove-cart-item:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

/* Cart Totals */
.rafz-cart-totals {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

.rafz-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 18px;
}

.rafz-cart-total-label {
  font-weight: 600;
  color: #333;
}

.rafz-cart-total-amount {
  font-weight: 700;
  color: #4caf50;
  font-size: 20px;
}

/* Discount rows */
.rafz-cart-discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.rafz-cart-discount-label {
  font-weight: 500;
  color: #666;
}

.rafz-cart-discount-amount {
  font-weight: 600;
  color: #f44336;
  font-size: 16px;
}

/* Final total row */
.rafz-cart-final-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 20px 0;
  padding: 15px 0;
  border-top: 2px solid #4caf50;
  font-size: 20px;
  font-weight: 700;
}

.rafz-cart-final-total-label {
  color: #333;
}

.rafz-cart-final-total-amount {
  color: #4caf50;
  font-size: 22px;
}

.rafz-cart-tax-notice {
  text-align: center;
  margin: 15px 0 10px 0;
}

.rafz-cart-tax-notice p {
  font-size: 14px;
  color: #666;
  margin: 0;
  font-style: italic;
}

.rafz-cart-checkout-notice {
  text-align: center;
  margin: 10px 0 20px 0;
}

.rafz-cart-checkout-notice p {
  font-size: 14px;
  color: #333;
  margin: 0;
  font-weight: 500;
}

.rafz-cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

/* Coupon Section */
.rafz-coupon-section {
  margin-bottom: 25px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.rafz-coupon-section h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.rafz-coupon-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.rafz-coupon-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.rafz-coupon-input:focus {
  outline: none;
  border-color: #4caf50;
}

.rafz-apply-coupon-btn {
  padding: 10px 20px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.rafz-apply-coupon-btn:hover {
  background: #45a049;
}

.rafz-apply-coupon-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.rafz-applied-coupons {
  margin-top: 15px;
}

.rafz-applied-coupons h5 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.rafz-coupon-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 4px;
  margin-bottom: 8px;
}

.rafz-coupon-info {
  flex: 1;
}

.rafz-coupon-info strong {
  display: block;
  color: #2e7d32;
  font-size: 14px;
  margin-bottom: 4px;
}

.rafz-coupon-discount {
  color: #1b5e20;
  font-size: 13px;
  font-weight: 500;
}

.rafz-coupon-description {
  color: #666;
  font-size: 12px;
  margin-top: 4px;
  font-style: italic;
}

.rafz-remove-coupon {
  background: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  flex-shrink: 0;
}

.rafz-remove-coupon:hover {
  background: #d32f2f;
}

/* Checkout View */
.rafz-checkout-view {
  max-width: 800px;
  margin: 0 auto;
}

.rafz-checkout-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.rafz-checkout-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.rafz-checkout-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rafz-checkout-form h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px;
}

.rafz-checkout-form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.rafz-form-field {
  display: flex;
  flex-direction: column;
}

.rafz-form-field label {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.rafz-form-field input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.rafz-form-field input:focus {
  outline: none;
  border-color: #4caf50;
}

.rafz-checkout-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Notifications */
.rafz-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  max-width: 400px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.rafz-notification.rafz-notification-show {
  opacity: 1;
  transform: translateY(0);
}

.rafz-notification-success {
  background: #4caf50;
}

.rafz-notification-error {
  background: #f44336;
}

.rafz-notification-info {
  background: #2196f3;
}

.rafz-notification-message {
  display: block;
  margin-right: 30px;
}

.rafz-notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rafz-shop-wrapper {
    padding: 25px 15px 15px 15px;
  }

  .rafz-categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rafz-shop[data-columns='2'] .rafz-products-grid,
  .rafz-shop[data-columns='3'] .rafz-products-grid,
  .rafz-shop[data-columns='4'] .rafz-products-grid,
  .rafz-shop[data-columns='5'] .rafz-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rafz-single-product-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .rafz-single-product-images {
    position: static;
  }

  .rafz-form-row {
    grid-template-columns: 1fr;
  }

  .rafz-shop-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .rafz-breadcrumb {
    flex: 1;
    min-width: 0; /* Allow text to truncate if needed */
    font-size: 14px; /* Smaller font on mobile */
  }

  .rafz-breadcrumb-category {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rafz-cart-summary {
    flex-shrink: 0; /* Keep cart button at fixed size */
  }

  .rafz-product-actions {
    flex-direction: column;
    gap: 8px;
  }

  .rafz-checkout-actions {
    flex-direction: column;
    gap: 15px;
  }

  .rafz-cart-actions {
    flex-direction: column;
    gap: 15px;
  }

  .rafz-cart-items-header {
    display: none;
  }

  .rafz-cart-item {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    border-bottom: none;
  }

  .rafz-cart-item-image {
    justify-content: center;
  }

  .rafz-cart-item-details {
    text-align: center;
  }

  .rafz-cart-item-quantity {
    flex-direction: row;
    justify-content: center;
  }

  .rafz-notification {
    left: 10px;
    right: 10px;
    max-width: none;
  }

  /* Coupon section mobile styles */
  .rafz-coupon-row {
    margin: 10px 0;
  }

  .rafz-coupon-input-wrapper {
    max-width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .rafz-apply-coupon-btn {
    width: 100%;
    padding: 12px;
  }

  .rafz-coupon-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .rafz-remove-coupon {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .rafz-shop[data-columns='2'] .rafz-products-grid,
  .rafz-shop[data-columns='3'] .rafz-products-grid,
  .rafz-shop[data-columns='4'] .rafz-products-grid,
  .rafz-shop[data-columns='5'] .rafz-products-grid {
    grid-template-columns: 1fr;
  }

  .rafz-product-title {
    font-size: 14px;
  }

  .rafz-product-price {
    font-size: 16px;
  }

  .rafz-checkout-content,
  .rafz-cart-content {
    padding: 20px;
  }
}

/* Coupon Row - Compact Design */
.rafz-coupon-row {
  margin: 15px 0;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.rafz-coupon-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 300px;
}

.rafz-coupon-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.rafz-coupon-input:focus {
  outline: none;
  border-color: #4caf50;
}

.rafz-apply-coupon-btn {
  padding: 8px 16px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.rafz-apply-coupon-btn:hover {
  background: #45a049;
}

.rafz-apply-coupon-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.rafz-applied-coupons {
  margin: 10px 0;
}

.rafz-coupon-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 12px;
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 13px;
}

.rafz-coupon-info {
  flex: 1;
}

.rafz-coupon-info strong {
  display: block;
  color: #2e7d32;
  font-size: 13px;
  margin-bottom: 2px;
}

.rafz-coupon-discount {
  color: #1b5e20;
  font-size: 12px;
  font-weight: 500;
}

.rafz-coupon-description {
  color: #666;
  font-size: 11px;
  margin-top: 2px;
  font-style: italic;
}

.rafz-remove-coupon {
  background: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  flex-shrink: 0;
}

.rafz-remove-coupon:hover {
  background: #d32f2f;
}

/* Product variations */
.rafz-product-variations {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
}

.rafz-variation-group {
  margin-bottom: 15px;
}

.rafz-variation-group:last-child {
  margin-bottom: 0;
}

.rafz-variation-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.rafz-variation-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.rafz-variation-select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.rafz-variation-select:hover {
  border-color: #bbb;
}

/* Mobile responsive variations */
@media (max-width: 768px) {
  .rafz-product-variations {
    margin: 15px 0;
    padding: 12px;
  }

  .rafz-variation-group {
    margin-bottom: 12px;
  }

  .rafz-variation-select {
    padding: 10px 12px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Product variation info on category pages */
.rafz-product-variations-info {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin: 5px 0;
}

.rafz-product-variations-info.rafz-no-stock {
  color: #e74c3c;
  font-weight: 500;
}

/* Enhanced price display */
.rafz-product-price .rafz-price-tax-notice {
  font-size: 11px;
  color: #888;
  font-weight: normal;
  margin-top: 2px;
}

/* Sale badge improvements */
.rafz-sale-badge {
  background: #e74c3c !important;
  color: white !important;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

/* Price styling */
.rafz-price {
  font-weight: bold;
  color: #333;
}

.rafz-sale-price {
  color: #e74c3c;
  font-weight: bold;
  margin-right: 8px;
}

.rafz-regular-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.9em;
}

.rafz-price-on-request {
  color: #666;
  font-style: italic;
  font-weight: normal;
}
