/* 
 * Jungle Commerce - Core Styles
 * These styles are designed to inherit from your WordPress theme.
 * You can override these variables in your theme's Customizer -> Additional CSS.
 */

:root {
    --jc-primary-color: inherit;
    --jc-primary-bg: #007bff;
    --jc-primary-text: #ffffff;
    --jc-border-radius: 8px;
    --jc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --jc-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --jc-bg-color: #ffffff;
    --jc-border-color: #e2e8f0;
    --jc-text-color: inherit;
    --jc-muted-text: #718096;
}

/* Base Containers */
.jungle-container {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
    color: var(--jc-text-color);
    box-sizing: border-box;
}

.jungle-container * {
    box-sizing: border-box;
}

/* Spinner Loader */
.jc-loader {
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top: 3px solid var(--jc-primary-bg);
    width: 24px;
    height: 24px;
    animation: jc-spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes jc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Store Grid */
.jc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.jc-product-card {
    background: var(--jc-bg-color);
    border: 1px solid var(--jc-border-color);
    border-radius: var(--jc-border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.jc-product-card:hover {
    box-shadow: var(--jc-shadow-hover);
    transform: translateY(-2px);
}

.jc-product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f7fafc;
    border-bottom: 1px solid var(--jc-border-color);
}

.jc-product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.jc-product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.jc-product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--jc-primary-bg);
    margin: 0 0 15px 0;
}

.jc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--jc-primary-bg);
    color: var(--jc-primary-text);
    border: none;
    border-radius: var(--jc-border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
    text-decoration: none;
    width: 100%;
    margin-top: auto;
}

.jc-btn:hover {
    opacity: 0.9;
    color: var(--jc-primary-text);
    text-decoration: none;
}

.jc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.jc-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    background: #e2e8f0;
    color: #4a5568;
    margin-bottom: 10px;
}
.jc-badge.success { background: #c6f6d5; color: #22543d; }
.jc-badge.danger { background: #fed7d7; color: #822727; }

/* Categories Filter */
.jc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.jc-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--jc-border-color);
    background: var(--jc-bg-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.jc-filter-btn.active, .jc-filter-btn:hover {
    background: var(--jc-primary-bg);
    color: var(--jc-primary-text);
    border-color: var(--jc-primary-bg);
}

/* Mini Cart / Drawer */
.jc-cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--jc-bg-color);
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999999;
    display: flex;
    flex-direction: column;
}

.jc-cart-drawer.open {
    right: 0;
}

.jc-cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--jc-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jc-cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

.jc-cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.jc-cart-footer {
    padding: 20px;
    border-top: 1px solid var(--jc-border-color);
}

.jc-cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--jc-border-color);
}

.jc-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 15px;
}

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

.jc-cart-item-title {
    font-weight: 600;
    margin: 0 0 5px 0;
}

.jc-cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jc-cart-controls button {
    background: #f1f5f9;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

/* Floating Cart Button */
.jc-floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--jc-primary-bg);
    color: var(--jc-primary-text);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--jc-shadow-hover);
    cursor: pointer;
    z-index: 999998;
    transition: transform 0.2s;
}

.jc-floating-cart:hover {
    transform: scale(1.1);
}

.jc-floating-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53e3e;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Account & Forms */
.jc-form-group {
    margin-bottom: 15px;
}

.jc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.jc-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--jc-border-color);
    border-radius: var(--jc-border-radius);
}

.jc-input:focus {
    outline: none;
    border-color: var(--jc-primary-bg);
}

.jc-alert {
    padding: 10px 15px;
    border-radius: var(--jc-border-radius);
    margin-bottom: 15px;
}
.jc-alert.error { background: #fed7d7; color: #822727; }
.jc-alert.success { background: #c6f6d5; color: #22543d; }
