/* Store Page Styles */

/* Store Header */
.store-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    color: white;
}

.store-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.store-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Store Section */
.store-section {
    padding: 4rem 0;
    background: var(--section-bg);
    min-height: 60vh;
}

/* Store Grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.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-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.product-content p {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.product-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.product-features li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

.product-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price small {
    font-size: 0.8rem;
    color: var(--light-text);
    font-weight: 400;
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.add-to-cart-btn.added {
    background: #28a745;
}

/* Cart Icon in Navbar */
.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
    font-size: 1.3rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.cart-icon:hover {
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-badge.hidden {
    display: none;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: white;
    z-index: 1200;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: var(--section-bg);
}

.cart-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.3s ease;
}

.cart-close:hover {
    color: #e74c3c;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-details .price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cart-item-quantity span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.remove-item:hover {
    transform: scale(1.2);
}

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.cart-empty.hidden {
    display: none;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: var(--section-bg);
}

.cart-footer.hidden {
    display: none;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.checkout-btn:hover {
    background: var(--secondary-color);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

/* Checkout Steps */
.checkout-step {
    animation: fadeIn 0.3s ease;
}

.checkout-step.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--primary-color);
    transform: scale(1.1);
}

.step-dot.completed {
    background: #28a745;
}

.step-line {
    width: 40px;
    height: 3px;
    background: #ddd;
    transition: background 0.3s ease;
}

.step-line.completed {
    background: #28a745;
}

.step-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.step-description {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Order Summary */
.order-summary {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.order-item-name {
    flex: 1;
}

.order-item-qty {
    color: var(--light-text);
    margin-right: 1rem;
}

.order-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 0;
    border-top: 2px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

/* OTP Section */
.otp-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    animation: fadeIn 0.3s ease;
}

.otp-section.hidden {
    display: none;
}

.otp-input-group input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.otp-timer {
    text-align: center;
    color: var(--light-text);
    margin: 1rem 0;
}

.otp-timer span {
    font-weight: 700;
    color: #e74c3c;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.95rem;
    display: block;
    margin: 0.5rem auto 1rem;
    text-decoration: underline;
}

.btn-link:disabled {
    color: var(--light-text);
    cursor: not-allowed;
    text-decoration: none;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Order Success */
.order-success {
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    color: #28a745;
    margin-bottom: 1rem;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.order-success h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.order-success>p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.order-details {
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.detail-row span:first-child {
    color: var(--light-text);
}

.order-id {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.note {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.note i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Spam/Junk folder notice */
.spam-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 1rem 0;
    text-align: center;
}

.spam-notice i {
    color: #ffc107;
    margin-right: 0.5rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ddd;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .store-header {
        padding: 6rem 0 3rem;
    }

    .store-header h1 {
        font-size: 2rem;
    }

    .store-grid {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .cart-icon {
        order: 2;
        margin-left: auto;
        margin-right: 1rem;
    }

    .hamburger {
        order: 3;
    }
}

/* Nav active state */
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}