
  /* Shopping Cart Styles */
  .cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .cart-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 3001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
  }

  .cart-sidebar.active {
    right: 0;
  }

  .cart-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Allow PHP-generated styles to override */
  .sd-product-listing-container .cart-header {
    background: inherit;
  }

  .cart-header h3 {
    margin: 0;
    font-size: 1.3em;
  }

  .cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
  }

  .cart-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
  }

  .cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
  }

  .cart-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
  }

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

  .cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
  }

  .cart-item-price {
    color: #4caf50;
    font-weight: bold;
    margin-bottom: 5px;
  }

  .cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .quantity-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  
  /* Allow PHP-generated styles to override */
  .sd-product-listing-container .quantity-btn {
    background: inherit;
  }

  .quantity-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
  }

  .quantity-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
  }

  .quantity-display {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
  }

  .cart-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    transition: all 0.3s ease;
  }
  
  /* Allow PHP-generated styles to override */
  .sd-product-listing-container .cart-item-remove {
    background: inherit;
  }

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

  .cart-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #eee;
  }

  .cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
  }

  .cart-total-amount {
    color: #4caf50;
    font-size: 1.4em;
  }

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

  .btn-clear-cart {
    flex: 1;
    padding: 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
  }

  .btn-clear-cart:hover {
    background: #5a6268;
  }

  .btn-checkout {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: larger;
    transition: all 0.3s ease;
  }
  
  /* Allow PHP-generated styles to override */
  .sd-product-listing-container .btn-checkout {
    background: inherit;
  }

  .btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  }

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

  .cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
  }

  .cart-empty-icon {
    font-size: 3em;
    margin-bottom: 20px;
    opacity: 0.5;
  }

  /* Cart badge for button */
  .btn-comprar {
    position: relative;
  }

  .cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
  }
  
  /* Allow PHP-generated styles to override */
  .sd-product-listing-container .cart-badge {
    background: inherit;
  }
  
  /* Cart gradient styling will be applied dynamically via JavaScript */

  /* Responsive cart */
  @media (max-width: 768px) {
    .cart-sidebar {
      width: 100%;
      right: -100%;
    }
    
    .cart-item {
      flex-direction: column;
      text-align: center;
    }
    
    .cart-item-image {
      margin-right: 0;
      margin-bottom: 10px;
    }
    
    .cart-actions {
      flex-direction: column;
    }
  }
  .producto-count {
    font-size: smaller;
  }

  /* Hide cart elements in admin/backoffice */
  body.wp-admin .cart-overlay,
  body.wp-admin .cart-sidebar,
  body.wp-admin .cart-badge,
  body.wp-admin .cart-btn,
  body.admin-bar .cart-overlay,
  body.admin-bar .cart-sidebar,
  body.admin-bar .cart-badge,
  body.admin-bar .cart-btn {
    display: none !important;
  }
  
  .hide {
    display: none;
  }