/**
 * Shopify Integration Styles
 */

/* Cart Icon in Header */
.cart-icon-wrapper {
    position: relative;
    margin-left: 20px;
}

.cart-icon {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 8px;
    transition: transform 0.2s ease;
}

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

.cart-icon svg {
    display: block;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #2A291F;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Cart Popup */
.cart-popup {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-popup.active {
    pointer-events: all;
    opacity: 1;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-popup.active .cart-content {
    transform: translateX(0);
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 24px;
}

.cart-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
}

.cart-close:hover {
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

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

.cart-item-details h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.cart-item-quantity button:hover {
    background: #f5f5f5;
}

.cart-item-price {
    font-weight: bold;
}

.cart-item-remove {
    position: absolute;
    top: 15px;
    right: 0;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #333;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #2A291F;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 10px;
}

.checkout-btn:hover {
    background: #1a1915;
}

.continue-shopping {
    display: block;
    text-align: center;
    color: #666;
    text-decoration: none;
    padding: 10px;
}

.continue-shopping:hover {
    color: #333;
}

/* Products Grid */
.shopify-products-page {
    padding: 60px 20px;
}

.shopify-products-page .container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
}

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

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin: 0 0 10px 0;
}

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

.product-price {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.out-of-stock {
    color: #999;
    font-size: 14px;
}

.add-to-cart-btn {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    background: #2A291F;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-to-cart-btn:hover {
    background: #1a1915;
}

/* Product Detail Page */
.shopify-product-page {
    padding: 60px 20px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-gallery .main-image {
    width: 100%;
    height: 600px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.thumbnail {
    height: 100px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: #2A291F;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details .product-title {
    font-size: 36px;
    margin: 0 0 20px 0;
}

.product-details .product-price {
    font-size: 28px;
    margin-bottom: 30px;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.6;
}

.product-options {
    margin-top: 30px;
}

.variant-selector,
.quantity-selector {
    margin-bottom: 20px;
}

.variant-selector label,
.quantity-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.variant-selector select,
.quantity-selector input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
}

.back-link:hover {
    color: #333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    background: #2A291F;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.pagination a:hover {
    background: #1a1915;
}

/* Responsive */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .cart-content {
        max-width: 100%;
    }
}

