/**
 * Shop Styles
 */

/* Shop Hero */
.shop-hero {
    background: linear-gradient(135deg, var(--ink-black) 0%, var(--deep-brown) 100%);
    color: var(--paper-cream);
    text-align: center;
    padding: 8rem 2rem 4rem;
}
.shop-hero h1 {
    font-family: 'Zen Antique', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
}
.shop-hero p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Shop Container */
.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Filters */
.shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.shop-filters button {
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--light-wash);
    background: white;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.shop-filters button:hover {
    border-color: var(--vermillion);
    color: var(--vermillion);
}
.shop-filters button.active {
    background: var(--vermillion);
    border-color: var(--vermillion);
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.product-card.featured {
    border: 2px solid var(--gold-accent);
}
.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold-accent);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}
.product-image {
    height: 220px;
    background: #f5f5f5;
    overflow: hidden;
    flex-shrink: 0;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}
.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--ink-black);
}
.product-description {
    font-size: 0.85rem;
    color: var(--soft-gray);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.product-footer > div {
    display: flex;
    flex-direction: column;
}
.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--vermillion);
}
.product-footer .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}
.product-footer .btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}
.stock-info {
    font-size: 0.7rem;
    color: #28a745;
    margin-top: 0.25rem;
}

/* Cart Button in Nav */
.cart-btn {
    position: relative;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--paper-cream);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.cart-btn:hover {
    background: var(--vermillion);
    border-color: var(--vermillion);
}
.cart-count {
    background: var(--vermillion);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.25rem;
}
.nav-link-home {
    color: var(--paper-cream);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 1rem;
    transition: color 0.3s ease;
}
.nav-link-home:hover {
    color: var(--gold-accent);
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}
.cart-header h2 {
    font-size: 1.3rem;
    margin: 0;
}
.cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
.cart-close:hover { color: var(--vermillion); }

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #888;
}
.cart-empty p { margin-bottom: 1.5rem; }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    position: relative;
}
.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}
.cart-item-info {
    flex: 1;
}
.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.cart-item-price {
    color: var(--vermillion);
    font-weight: 600;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
.cart-item-qty button:hover {
    background: var(--vermillion);
    color: white;
    border-color: var(--vermillion);
}
.cart-item-qty span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}
.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
}
.cart-item-remove:hover { color: var(--vermillion); }

.cart-summary {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}
.shipping-msg {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    text-align: center;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 0.75rem;
    border-top: 1px solid #ddd;
    margin-top: 0.75rem;
}
.cart-summary .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Checkout Modal */
.checkout-modal {
    max-width: 500px;
}
.checkout-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.checkout-modal .form-group {
    margin-bottom: 0.75rem;
}
.checkout-modal .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.checkout-modal input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}
.checkout-modal input:focus {
    border-color: var(--vermillion);
    outline: none;
}
.checkout-summary {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Shop Footer */
.shop-footer {
    background: var(--ink-black);
    color: var(--paper-cream);
    padding: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}
.shop-footer a {
    color: var(--gold-accent);
    text-decoration: none;
}
.shop-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .shop-hero { padding: 7rem 1.5rem 3rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .cart-sidebar { width: 100%; max-width: 100%; }
    .checkout-modal .form-row { grid-template-columns: 1fr; }
    .shop-footer { flex-direction: column; gap: 1rem; }
}
