/* Shop Manager Public Styles */

/* Products Grid */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.shop-products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.shop-products-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .shop-products-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

.shop-product-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.shop-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shop-product-item:hover .product-image img {
    transform: scale(1.1);
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add-to-cart,
.btn-view-product {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-add-to-cart {
    background: #4CAF50;
    color: white;
}

.btn-add-to-cart:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-view-product {
    background: #2196F3;
    color: white;
}

.btn-view-product:hover {
    background: #1976D2;
    color: white;
    text-decoration: none;
}

/* Cart Styles */
.shop-cart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty p:first-child {
    font-size: 48px;
    margin-bottom: 20px;
}

.shop-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.shop-cart-table thead {
    background: #f5f5f5;
}

.shop-cart-table th,
.shop-cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.shop-cart-table th {
    font-weight: 600;
    color: #333;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-quantity-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

.cart-price,
.cart-subtotal {
    font-size: 16px;
    color: #333;
}

.btn-remove-item {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-remove-item:hover {
    transform: scale(1.2);
}

.shop-cart-table tfoot td {
    font-size: 20px;
    padding: 20px 15px;
    border-top: 2px solid #333;
}

.cart-total-amount {
    color: #d32f2f;
    font-size: 24px;
}

.cart-actions {
    text-align: right;
    margin-top: 30px;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-checkout {
    background: #FF9800;
    color: white;
}

.btn-checkout:hover {
    background: #F57C00;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Checkout Styles */
.shop-checkout-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
}

.checkout-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

@media (max-width: 1024px) {
    .checkout-row {
        grid-template-columns: 1fr;
    }
}

.checkout-col-left,
.checkout-col-right {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.required {
    color: #d32f2f;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method-option:hover {
    border-color: #2196F3;
    background: #f5f9ff;
}

.payment-method-option input[type="radio"] {
    width: auto;
    margin-right: 15px;
}

.payment-label {
    display: flex;
    flex-direction: column;
}

.payment-label strong {
    font-size: 16px;
    margin-bottom: 4px;
}

.payment-label small {
    color: #666;
    font-size: 13px;
}

.btn-submit-order {
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 16px;
    font-size: 18px;
}

.btn-submit-order:hover {
    background: #45a049;
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.order-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.order-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.order-item-quantity {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.order-item-price {
    font-weight: 600;
    color: #d32f2f;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 20px;
    border-top: 2px solid #333;
}

.order-total strong {
    color: #d32f2f;
    font-size: 24px;
}

/* Modal Styles */
.shop-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: white;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
    text-align: center;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.modal-icon.success {
    color: #4CAF50;
    background: #e8f5e9;
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.modal-content h2 {
    margin: 0 0 15px;
    color: #333;
}

.qr-code-container {
    margin: 30px 0;
}

.qr-code-image {
    max-width: 280px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px;
}

.bank-info {
    text-align: left;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.bank-info p {
    margin: 10px 0;
    font-size: 15px;
}

.transfer-amount {
    color: #d32f2f;
    font-size: 20px;
    font-weight: 700;
}

.modal-note {
    background: #fff3cd;
    padding: 15px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-primary:hover {
    background: #1976D2;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .shop-cart-table {
        font-size: 14px;
    }
    
    .cart-product-image {
        width: 60px;
        height: 60px;
    }
    
    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }
}

/* Notification Styles - Thêm vào cuối file public.css */
.shop-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999999;
    min-width: 300px;
    max-width: 400px;
    transition: right 0.3s ease;
    border-left: 4px solid #2271b1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-notification.show {
    right: 20px;
}

.shop-notification.success {
    border-left-color: #4CAF50;
}

.shop-notification.success::before {
    content: '✓';
    background: #4CAF50;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.shop-notification.error {
    border-left-color: #f44336;
}

.shop-notification.error::before {
    content: '✕';
    background: #f44336;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.shop-notification.warning {
    border-left-color: #ff9800;
}

.shop-notification.warning::before {
    content: '⚠';
    background: #ff9800;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.error-field {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

/* Cập nhật Product Actions */
.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add-to-cart {
    flex: 1;
    width: 100%; /* Full width khi chỉ có 1 nút */
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #4CAF50;
    color: white;
}

.btn-add-to-cart:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

.btn-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Cart Counter Badge */
.shop-cart-badge {
    position: relative;
    display: inline-block;
}

.shop-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d32f2f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    animation: bounceIn 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.shop-cart-count.updating {
    animation: pulse 0.6s ease;
}

/* Animation cho button khi thêm vào giỏ */
.btn-add-to-cart {
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart.adding {
    animation: buttonPulse 0.4s ease;
}

.btn-add-to-cart.added {
    background: #2196F3 !important;
}

.btn-add-to-cart .loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.btn-add-to-cart.loading .loading-spinner {
    display: inline-block;
}

.btn-add-to-cart.loading .btn-text {
    display: none;
}

/* Particle effect */
@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

.cart-particle {
    position: fixed;
    pointer-events: none;
    font-size: 24px;
    z-index: 9999;
    animation: particleFloat 1s ease-out forwards;
}

/* Bounce animation */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* Button pulse animation */
@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Spin animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mini Cart Dropdown */
.shop-mini-cart {
    position: relative;
}

.mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 320px;
    max-width: 400px;
    z-index: 9999;
    display: none;
    margin-top: 10px;
    animation: slideDown 0.3s ease;
}

.shop-mini-cart:hover .mini-cart-dropdown,
.mini-cart-dropdown:hover {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mini-cart-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.mini-cart-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
}

.mini-cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.mini-cart-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mini-cart-item:last-child {
    border-bottom: none;
}

.mini-cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.mini-cart-item-info {
    flex: 1;
}

.mini-cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.mini-cart-item-details {
    font-size: 12px;
    color: #666;
}

.mini-cart-item-price {
    font-weight: 600;
    color: #d32f2f;
}

.mini-cart-empty {
    padding: 30px;
    text-align: center;
    color: #999;
}

.mini-cart-footer {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.mini-cart-total-amount {
    color: #d32f2f;
}

.mini-cart-actions {
    display: flex;
    gap: 10px;
}

.mini-cart-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.mini-cart-btn.view-cart {
    background: #f0f0f0;
    color: #333;
}

.mini-cart-btn.view-cart:hover {
    background: #e0e0e0;
}

.mini-cart-btn.checkout {
    background: #4CAF50;
    color: white;
}

.mini-cart-btn.checkout:hover {
    background: #45a049;
}

/* Success toast notification */
.shop-toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    transition: bottom 0.3s ease;
    border-left: 4px solid #4CAF50;
}

.shop-toast.show {
    bottom: 20px;
}

.shop-toast-icon {
    font-size: 24px;
}

.shop-toast-content {
    flex: 1;
}

.shop-toast-title {
    font-weight: 600;
    margin-bottom: 3px;
    color: #333;
}

.shop-toast-message {
    font-size: 13px;
    color: #666;
}

.shop-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-toast-close:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .mini-cart-dropdown {
        right: -20px;
        width: calc(100vw - 40px);
        max-width: 100%;
    }
    
    .shop-toast {
        right: 10px;
        left: 10px;
        width: auto;
    }
}


/* ============================================
   Product Grid Styles
   ============================================ */

.shop-products-container {
    margin: 30px 0;
}

.shop-products-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

/* Columns layout */
.shop-products-container.columns-2 .shop-products-grid {
    grid-template-columns: repeat(2, 1fr);
}

.shop-products-container.columns-3 .shop-products-grid {
    grid-template-columns: repeat(3, 1fr);
}

.shop-products-container.columns-4 .shop-products-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

/* Product Image */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Product Content */
.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: #2271b1;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.product-price {
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #d32f2f;
}

.price-contact {
    font-size: 16px;
    color: #666;
    font-style: italic;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-buy-now {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #e082ea 0%, #e4465b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Button States */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.added {
    background: #4CAF50 !important;
}

.btn .btn-icon {
    font-size: 16px;
}

.btn .loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.btn.loading .loading-spinner {
    display: inline-block;
}

.btn.loading .btn-text,
.btn.loading .btn-icon {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .shop-products-container.columns-4 .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-products-container.columns-3 .shop-products-grid,
    .shop-products-container.columns-4 .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-products-container.columns-2 .shop-products-grid,
    .shop-products-container.columns-3 .shop-products-grid,
    .shop-products-container.columns-4 .shop-products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .price-amount {
        font-size: 18px;
    }
}
/* ============================================
   Product Grid & Cards
   ============================================ */

.shop-products-container {
    margin: 30px 0;
}

.shop-products-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

/* Responsive columns */
.shop-products-container.columns-2 .shop-products-grid {
    grid-template-columns: repeat(2, 1fr);
}

.shop-products-container.columns-3 .shop-products-grid {
    grid-template-columns: repeat(3, 1fr);
}

.shop-products-container.columns-4 .shop-products-grid {
    grid-template-columns: repeat(4, 1fr);
}

.shop-products-container.columns-5 .shop-products-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Product Item */
.product-item {
    position: relative;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

/* Product Image */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.product-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    z-index: 2;
}

/* Product Content */
.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 50px;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: #667eea;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 15px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.price-amount {
    font-size: 22px;
    font-weight: 700;
    color: #d32f2f;
    display: inline-block;
}

.price-contact {
    font-size: 16px;
    color: #999;
    font-style: italic;
    font-weight: 600;
}

/* ============================================
   Product Action Buttons
   ============================================ */

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Add to Cart Button */
.btn-add-to-cart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

/* Buy Now Button */
.btn-buy-now {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #e082ea 0%, #e4465b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.5);
}

.btn-buy-now:active {
    transform: translateY(0);
}

/* Button States */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
    cursor: wait;
}

.btn.added {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4) !important;
}

.btn .btn-icon {
    font-size: 16px;
    line-height: 1;
}

.btn .btn-text {
    line-height: 1;
}

.btn .loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.btn.loading .loading-spinner {
    display: inline-block;
}

.btn.loading .btn-text,
.btn.loading .btn-icon {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .shop-products-container.columns-5 .shop-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .shop-products-container.columns-4 .shop-products-grid,
    .shop-products-container.columns-5 .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-products-container.columns-3 .shop-products-grid,
    .shop-products-container.columns-4 .shop-products-grid,
    .shop-products-container.columns-5 .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shop-products-grid {
        gap: 20px;
    }
    
    .product-content {
        padding: 15px;
    }
    
    .product-title {
        font-size: 16px;
        min-height: auto;
    }
    
    .product-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .price-amount {
        font-size: 18px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-products-container.columns-2 .shop-products-grid,
    .shop-products-container.columns-3 .shop-products-grid,
    .shop-products-container.columns-4 .shop-products-grid,
    .shop-products-container.columns-5 .shop-products-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-products-grid {
        gap: 15px;
    }
    
    .product-badge {
        font-size: 11px;
        padding: 4px 10px;
        top: 8px;
        right: 8px;
    }
    
    .product-title {
        font-size: 15px;
    }
    
    .price-amount {
        font-size: 16px;
    }
    
    .product-actions .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}
