/* Kunaki Integration - Frontend Styles */

/* Products Grid */
.kunaki-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.kunaki-products[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

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

@media (max-width: 768px) {
    .kunaki-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .kunaki-products {
        grid-template-columns: 1fr;
    }
}

.kunaki-product {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.kunaki-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kunaki-product-image {
    margin-bottom: 15px;
    text-align: center;
}

.kunaki-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.kunaki-product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.kunaki-product-type {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 10px;
}

.kunaki-product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.kunaki-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 15px;
}

.kunaki-add-to-cart {
    width: 100%;
    padding: 12px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.kunaki-add-to-cart:hover {
    background: #135e96;
}

.kunaki-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Cart */
.kunaki-cart {
    margin: 30px 0;
}

.kunaki-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
}

.kunaki-cart-table th,
.kunaki-cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.kunaki-cart-table th {
    background: #f5f5f5;
    font-weight: 600;
}

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

.kunaki-cart-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.kunaki-cart-quantity {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.kunaki-remove-from-cart {
    padding: 8px 15px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.kunaki-remove-from-cart:hover {
    background: #c82333;
}

.kunaki-cart-actions {
    text-align: right;
}

/* Buttons */
.kunaki-button {
    display: inline-block;
    padding: 12px 24px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kunaki-button:hover {
    background: #e0e0e0;
}

.kunaki-button-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.kunaki-button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Checkout */
.kunaki-checkout {
    max-width: 800px;
    margin: 30px auto;
}

.kunaki-checkout-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.kunaki-checkout-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.kunaki-form-row {
    margin-bottom: 20px;
}

.kunaki-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.kunaki-form-row input,
.kunaki-form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.kunaki-shipping-option {
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kunaki-shipping-option:hover {
    background: #f0f0f0;
}

.kunaki-shipping-option input[type="radio"]:checked + label,
.kunaki-shipping-option:has(input[type="radio"]:checked) {
    border-color: #2271b1;
    background: #e7f3ff;
}

.kunaki-checkout-actions {
    text-align: center;
}

/* Messages */
.kunaki-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
}

.kunaki-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kunaki-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Account */
.kunaki-account {
    max-width: 1000px;
    margin: 30px auto;
}

.kunaki-account-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.kunaki-account-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.kunaki-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.kunaki-orders-table th,
.kunaki-orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.kunaki-orders-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.kunaki-order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.kunaki-order-status-pending {
    background: #fff3cd;
    color: #856404;
}

.kunaki-order-status-processing {
    background: #cce5ff;
    color: #004085;
}

.kunaki-order-status-shipped {
    background: #d4edda;
    color: #155724;
}

.kunaki-order-status-cancelled,
.kunaki-order-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.kunaki-tracking-link {
    color: #2271b1;
    text-decoration: none;
}

.kunaki-tracking-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .kunaki-cart-table,
    .kunaki-orders-table {
        font-size: 12px;
    }
    
    .kunaki-cart-table th,
    .kunaki-cart-table td,
    .kunaki-orders-table th,
    .kunaki-orders-table td {
        padding: 10px 5px;
    }
    
    .kunaki-form-row-half {
        grid-template-columns: 1fr;
    }
}
