/* MERCHANDISE PAGE STYLES */

/* PAGE HEADER */
.page-header {
    padding: 100px 0;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.03);
}

.page-header h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.page-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* FILTER SECTION */
.product-filters {
    padding: 60px 0 30px;
}

.filter-container {
    text-align: center;
}

.filter-container h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background-color: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

/* PRODUCTS GRID */
.products-section {
    padding: 0 0 80px;
}

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

.product-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

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

.product-image-container {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: var(--background);
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 1;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
}

.original-price {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    margin-left: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.add-to-cart {
    flex: 1;
    background-color: var(--primary);
    color: var(--background);
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    opacity: 0.9;
}

.quick-view {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.quick-view:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* SHOPPING CART SIDEBAR */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--background);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-cart {
    font-size: 1.8rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--primary);
}

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

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

.cart-item-variant {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
}

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

.quantity-btn {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.quantity-input {
    width: 40px;
    height: 30px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    margin: 0 5px;
}

.remove-item {
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 0;
    transition: var(--transition);
}

.remove-item:hover {
    color: var(--primary);
}

.empty-cart {
    text-align: center;
    padding: 50px 0;
}

.empty-cart i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.empty-cart p {
    margin-bottom: 20px;
}

.empty-cart .shop-now-btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--background);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.empty-cart .shop-now-btn:hover {
    opacity: 0.9;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-summary {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 1.2rem;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    opacity: 0.9;
}

.cart-note {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* PRODUCT MODAL */
.product-modal-content {
    padding: 0;
    max-width: 900px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.product-detail-images {
    position: relative;
}

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

.product-detail-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.product-detail-category {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-detail-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-detail-price {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-detail-current-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.product-detail-original-price {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    margin-left: 10px;
}

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

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

.option-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.size-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.size-option:hover {
    border-color: var(--primary);
}

.size-option.selected {
    background-color: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.color-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--primary);
}

.color-option.selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--background);
}

.size-guide-link {
    display: inline-block;
    color: var(--primary);
    margin-top: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.size-guide-link:hover {
    text-decoration: underline;
}

.product-detail-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.product-detail-add-to-cart {
    flex: 1;
    padding: 15px;
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.product-detail-add-to-cart:hover {
    opacity: 0.9;
}

.product-quantity {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.product-quantity-btn {
    width: 40px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.product-quantity-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.product-quantity-input {
    width: 50px;
    height: 48px;
    text-align: center;
    background-color: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
}

/* SIZE GUIDE MODAL */
.size-guide-modal-content {
    max-width: 700px;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.size-table th, .size-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.size-table th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.size-guide-notes ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.size-guide-notes li {
    margin-bottom: 5px;
}

/* CHECKOUT MODAL */
.checkout-modal-content {
    max-width: 900px;
    padding: 0;
}

.checkout-form-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
}

.checkout-form {
    padding: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.15);
}

#payment-element {
    margin-top: 20px;
    min-height: 150px;
}

.card-placeholder {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    padding: 30px;
    text-align: center;
    border-radius: 4px;
}

.order-summary {
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.02);
}

.order-summary h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-items {
    margin-bottom: 30px;
}

.summary-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.summary-item-title {
    margin-bottom: 5px;
    font-weight: 500;
}

.summary-item-variant {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.summary-item-price {
    font-weight: 600;
    color: var(--primary);
}

.summary-totals {
    margin-top: 30px;
}

.place-order-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 30px;
}

.place-order-btn:hover {
    opacity: 0.9;
}

/* EMPTY STATE */
.empty-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .checkout-form-container {
        grid-template-columns: 1fr;
    }
    
    .checkout-form {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 3rem;
    }
    
    .page-intro {
        font-size: 1rem;
    }
    
    .filter-buttons {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .cart-sidebar {
        max-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}