/* Products Page CSS */

.products-page {
    min-height: 100vh;
    padding: 4rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    margin-bottom: 4rem;
}

.filter-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-card {
    background: var(--bg-card);
    border: 2px solid var(--border-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: var(--takemi-red);
    transform: translateY(-2px);
}

.category-card.active {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.category-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--takemi-red), var(--takemi-red-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.category-card.active .category-icon {
    background: linear-gradient(135deg, var(--success), #059669);
}

.category-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.product-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Products Grid */
.products-section h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

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

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--takemi-red);
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.3);
}

.product-image-container {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.product-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--takemi-red), var(--takemi-red-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.product-price-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9375rem;
}

/* Product Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: var(--error);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

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

.product-badge {
    position: absolute;
    top: -1rem;
    left: 0;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
}

.product-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 20px;
    margin: 2rem 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-category {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0.5rem 0 1rem;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.product-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
}

.price-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--success);
}

.product-detail-right h3 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-secondary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--takemi-red);
}

.btn-check {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-check:hover {
    background: rgba(59, 130, 246, 0.3);
}

.order-summary-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-secondary);
}

.summary-row:last-child {
    border: none;
}

.summary-row.total {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid var(--border-primary);
}

.text-success {
    color: var(--success);
    font-weight: 700;
}

.price-highlight {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--takemi-red);
}

@media (max-width: 768px) {
    .modal-body { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .products-hero h1 { font-size: 1.75rem; }
    .modal-content { margin: 0.5rem; border-radius: 16px; max-height: 95vh; }
}
@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr 1fr; }
    .product-grid { grid-template-columns: 1fr 1fr !important; }
}

/* Product List Cards */
.product-card-item { position: relative; background: var(--bg-card); border-radius: 16px; padding: 1.5rem; transition: all 0.3s; cursor: pointer; border: 2px solid var(--border-secondary); }
.product-card-item:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3); border-color: var(--takemi-red); }
.product-card-badge { position: absolute; top: 1rem; right: 1rem; background: linear-gradient(135deg, var(--takemi-red), var(--takemi-red-dark)); color: white; padding: 0.375rem 0.75rem; border-radius: 8px; font-size: 0.75rem; font-weight: 700; z-index: 1; }
.product-card-image { padding: 2rem 1rem; text-align: center; }
.product-card-info { text-align: center; }
.product-card-info h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.product-card-price { font-size: 1.5rem; font-weight: 800; color: var(--success); margin: 1rem 0; }
.product-card-btn { 
    position: relative;
    width: 100%; 
    padding: 0.875rem; 
    background: var(--bg-secondary);
    color: white; 
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px; 
    font-weight: 600; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.5rem; 
    transition: all 0.3s;
    overflow: hidden;
}
.product-card-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(135deg, var(--takemi-red), var(--takemi-red-dark), var(--takemi-red));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}
.product-card-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border-color: var(--takemi-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.product-card-btn:hover::before {
    opacity: 1;
}
.product-card-btn i {
    font-size: 1rem;
}
.back-button { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); text-decoration: none; transition: color 0.3s; }
.back-button:hover { color: var(--takemi-red); }
