/**
 * PDX8I Ecommerce Plugin Styles
 */

/* Reset and Base Styles */
.pdx8i-products-grid,
.pdx8i-cart,
.pdx8i-checkout-form {
    font-family: var(--pdx8i-font-family);
    line-height: 1.6;
    color: var(--pdx8i-text-color);
}

/* Products Grid */
.pdx8i-products-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pdx8i-products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.pdx8i-product-card {
    background: var(--pdx8i-background-color);
    border-radius: var(--pdx8i-border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, var(--pdx8i-shadow-intensity));
    overflow: hidden;
    transition: transform var(--pdx8i-transition-speed) ease, box-shadow var(--pdx8i-transition-speed) ease;
    border: 1px solid var(--pdx8i-border-color);
    height: var(--pdx8i-product-card-height);
}

.pdx8i-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, calc(var(--pdx8i-shadow-intensity) * 1.5));
}

.pdx8i-product-image {
    position: relative;
    height: var(--pdx8i-product-image-height);
    overflow: hidden;
    background: var(--pdx8i-secondary-color);
}

.pdx8i-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--pdx8i-transition-speed) ease;
}

.pdx8i-product-card:hover .pdx8i-product-image img {
    transform: scale(1.05);
}

.pdx8i-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 14px;
}

.pdx8i-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--pdx8i-danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.pdx8i-product-info {
    padding: var(--pdx8i-spacing-unit);
}

.pdx8i-product-title {
    margin: 0 0 10px 0;
    font-size: var(--pdx8i-font-size-large);
    font-weight: 600;
}

.pdx8i-product-title a {
    color: var(--pdx8i-text-color);
    text-decoration: none;
    transition: color var(--pdx8i-transition-speed) ease;
}

.pdx8i-product-title a:hover {
    color: var(--pdx8i-primary-color);
}

.pdx8i-product-price {
    margin-bottom: 15px;
}

.pdx8i-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--pdx8i-success-color);
}

.pdx8i-regular-price {
    font-size: var(--pdx8i-font-size-base);
    color: var(--pdx8i-secondary-color);
    text-decoration: line-through;
    margin-right: 8px;
}

.pdx8i-sale-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--pdx8i-danger-color);
}

.pdx8i-product-excerpt {
    color: var(--pdx8i-secondary-color);
    font-size: var(--pdx8i-font-size-small);
    margin-bottom: var(--pdx8i-spacing-unit);
    line-height: 1.5;
}

.pdx8i-product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pdx8i-quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--pdx8i-border-color);
    border-radius: 6px;
    overflow: hidden;
}

.pdx8i-quantity-btn {
    background: var(--pdx8i-secondary-color);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color var(--pdx8i-transition-speed) ease;
}

.pdx8i-quantity-btn:hover {
    background: var(--pdx8i-border-color);
}

.pdx8i-quantity-input {
    border: none;
    text-align: center;
    width: 50px;
    padding: 8px;
    font-size: 14px;
}

.pdx8i-add-to-cart-btn {
    background: var(--pdx8i-primary-color);
    color: white;
    border: none;
    padding: var(--pdx8i-button-padding);
    border-radius: var(--pdx8i-border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color var(--pdx8i-transition-speed) ease;
    flex: 1;
}

.pdx8i-add-to-cart-btn:hover {
    background: var(--pdx8i-primary-color);
    opacity: 0.8;
}

.pdx8i-out-of-stock,
.pdx8i-product-unavailable {
    color: var(--pdx8i-danger-color);
    font-weight: 600;
    text-align: center;
    padding: 10px;
    background: var(--pdx8i-danger-color);
    opacity: 0.1;
    border-radius: var(--pdx8i-border-radius);
}

/* Cart Styles */
.pdx8i-cart {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--pdx8i-spacing-unit);
}

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

.pdx8i-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: var(--pdx8i-spacing-unit);
    align-items: center;
    padding: var(--pdx8i-spacing-unit);
    background: var(--pdx8i-background-color);
    border-radius: var(--pdx8i-border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, var(--pdx8i-shadow-intensity));
    margin-bottom: 15px;
}

.pdx8i-cart-item-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
}

.pdx8i-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdx8i-cart-item-title {
    margin: 0 0 5px 0;
    font-size: var(--pdx8i-font-size-base);
    font-weight: 600;
}

.pdx8i-cart-item-sku {
    margin: 0;
    font-size: 12px;
    color: var(--pdx8i-secondary-color);
}

.pdx8i-cart-item-price {
    margin: 5px 0 0 0;
    font-size: var(--pdx8i-font-size-small);
    color: var(--pdx8i-success-color);
}

.pdx8i-cart-item-total {
    font-weight: 700;
    font-size: var(--pdx8i-font-size-base);
    color: var(--pdx8i-text-color);
}

.pdx8i-remove-item-btn {
    background: var(--pdx8i-danger-color);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--pdx8i-transition-speed) ease;
}

.pdx8i-remove-item-btn:hover {
    background: var(--pdx8i-danger-color);
    opacity: 0.8;
}

.pdx8i-cart-summary {
    background: var(--pdx8i-secondary-color);
    opacity: 0.1;
    padding: var(--pdx8i-spacing-unit);
    border-radius: var(--pdx8i-border-radius);
    margin-bottom: var(--pdx8i-spacing-unit);
}

.pdx8i-cart-subtotal,
.pdx8i-cart-tax,
.pdx8i-cart-shipping,
.pdx8i-cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pdx8i-cart-total {
    font-weight: 700;
    font-size: var(--pdx8i-font-size-large);
    border-top: 1px solid var(--pdx8i-border-color);
    padding-top: 10px;
    margin-top: 10px;
}

.pdx8i-cart-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.pdx8i-continue-shopping-btn,
.pdx8i-checkout-btn {
    padding: var(--pdx8i-button-padding);
    border-radius: var(--pdx8i-border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--pdx8i-transition-speed) ease;
}

.pdx8i-continue-shopping-btn {
    background: var(--pdx8i-secondary-color);
    color: white;
}

.pdx8i-continue-shopping-btn:hover {
    background: var(--pdx8i-secondary-color);
    opacity: 0.8;
    color: white;
}

.pdx8i-checkout-btn {
    background: var(--pdx8i-success-color);
    color: white;
}

.pdx8i-checkout-btn:hover {
    background: var(--pdx8i-success-color);
    opacity: 0.8;
    color: white;
}

.pdx8i-empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.pdx8i-empty-cart-icon {
    font-size: 48px;
    color: var(--pdx8i-secondary-color);
    margin-bottom: var(--pdx8i-spacing-unit);
}

.pdx8i-start-shopping-btn {
    display: inline-block;
    background: var(--pdx8i-primary-color);
    color: white;
    padding: var(--pdx8i-button-padding);
    border-radius: var(--pdx8i-border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background-color var(--pdx8i-transition-speed) ease;
}

.pdx8i-start-shopping-btn:hover {
    background: var(--pdx8i-primary-color);
    opacity: 0.8;
    color: white;
}

/* Checkout Styles */
.pdx8i-checkout-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--pdx8i-spacing-unit);
}

.pdx8i-checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.pdx8i-checkout-section {
    background: var(--pdx8i-background-color);
    padding: 25px;
    border-radius: var(--pdx8i-border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, var(--pdx8i-shadow-intensity));
    margin-bottom: var(--pdx8i-spacing-unit);
}

.pdx8i-checkout-section h3 {
    margin: 0 0 20px 0;
    font-size: var(--pdx8i-font-size-large);
    font-weight: 600;
    color: var(--pdx8i-text-color);
    border-bottom: 2px solid var(--pdx8i-primary-color);
    padding-bottom: 10px;
}

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

.pdx8i-form-group {
    margin-bottom: 20px;
}

.pdx8i-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--pdx8i-text-color);
}

.pdx8i-form-group input,
.pdx8i-form-group select,
.pdx8i-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--pdx8i-border-color);
    border-radius: var(--pdx8i-border-radius);
    font-size: var(--pdx8i-font-size-small);
    transition: border-color var(--pdx8i-transition-speed) ease;
}

.pdx8i-form-group input:focus,
.pdx8i-form-group select:focus,
.pdx8i-form-group textarea:focus {
    outline: none;
    border-color: var(--pdx8i-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.pdx8i-order-summary {
    background: var(--pdx8i-secondary-color);
    opacity: 0.1;
    padding: 25px;
    border-radius: var(--pdx8i-border-radius);
    position: sticky;
    top: 20px;
}

.pdx8i-order-summary h3 {
    margin: 0 0 20px 0;
    font-size: var(--pdx8i-font-size-large);
    font-weight: 600;
    color: var(--pdx8i-text-color);
}

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

.pdx8i-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--pdx8i-border-color);
}

.pdx8i-order-item:last-child {
    border-bottom: none;
}

.pdx8i-order-item-info {
    flex: 1;
}

.pdx8i-order-item-name {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.pdx8i-order-item-quantity {
    font-size: 12px;
    color: var(--pdx8i-secondary-color);
}

.pdx8i-order-item-price {
    font-weight: 600;
    color: var(--pdx8i-success-color);
}

.pdx8i-order-totals {
    border-top: 2px solid var(--pdx8i-border-color);
    padding-top: 15px;
}

.pdx8i-order-subtotal,
.pdx8i-order-tax,
.pdx8i-order-shipping,
.pdx8i-order-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pdx8i-order-total {
    font-weight: 700;
    font-size: var(--pdx8i-font-size-large);
    border-top: 1px solid var(--pdx8i-border-color);
    padding-top: 10px;
    margin-top: 10px;
}

.pdx8i-checkout-actions {
    margin-top: 20px;
}

.pdx8i-place-order-btn {
    width: 100%;
    background: var(--pdx8i-success-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: var(--pdx8i-border-radius);
    font-size: var(--pdx8i-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--pdx8i-transition-speed) ease;
    margin-bottom: 10px;
}

.pdx8i-place-order-btn:hover {
    background: var(--pdx8i-success-color);
    opacity: 0.8;
}

.pdx8i-place-order-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.pdx8i-continue-shopping-link {
    display: block;
    text-align: center;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.pdx8i-continue-shopping-link:hover {
    text-decoration: underline;
}

/* Modal Styles */
.pdx8i-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.pdx8i-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.pdx8i-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    z-index: 1001;
}

.pdx8i-close:hover {
    color: #333;
}

.pdx8i-modal-content h2 {
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

#pdx8i-cart-content {
    padding: 20px;
}

/* Pagination */
.pdx8i-pagination {
    text-align: center;
    margin-top: 40px;
}

.pdx8i-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.pdx8i-pagination .page-numbers:hover,
.pdx8i-pagination .page-numbers.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdx8i-products-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .pdx8i-cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .pdx8i-cart-item-image {
        width: 100%;
        height: 150px;
    }
    
    .pdx8i-checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pdx8i-form-row {
        grid-template-columns: 1fr;
    }
    
    .pdx8i-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .pdx8i-products-container {
        grid-template-columns: 1fr;
    }
    
    .pdx8i-product-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .pdx8i-cart-actions {
        flex-direction: column;
    }
} 