/* --- Animations --- */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading Styles */
.skeleton {
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 5px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin-bottom: 20px;
}

.skeleton-card {
    height: 140px;
    width: 100%;
    border-radius: 12px;
    background: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skeleton-text {
    height: 15px;
    width: 90%;
    margin-bottom: 10px;
}

.skeleton-price {
    height: 25px;
    width: 60px;
}

.skeleton-button {
    height: 35px;
    width: 100px;
    border-radius: 20px;
}

/* Header Specifics */
.logo span {
    color: var(--secondary-color);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--light-color);
    font-size: 15px;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #166fe5;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #36a420;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.cart-icon {
    display: none;
}

.btn-header i {
    font-size: 16px;
    display: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: white;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu a i {
    font-size: 14px;
}

/* Main Content */
main {
    padding: 40px 0;
    min-height: calc(100vh - 400px);
}

main section {
    margin-bottom: 50px;
}

/* Section Title */
.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.section-title i {
    color: var(--primary-color);
}

/* Featured Products */
.products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    width: 100%;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid #1877F2;
    cursor: pointer;
    min-height: 220px;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(24, 119, 242, 0.15);
}

.product-img {
    display: none;
}

.product-badge {
    display: none;
}

.product-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 18px;
    color: #1c1e21;
}

.product-description {
    color: #65676b;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: #65676b;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: #1877F2;
    margin-bottom: 5px;
}

.btn-buy {
    background: linear-gradient(135deg, #1877F2 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #166fe5 0%, #36a420 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-detail {
    background-color: #f0f2f5;
    color: #65676b;
    border: none;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-detail:hover {
    background-color: #e4e6eb;
    color: var(--text-color);
}

.product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
}

.product-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-btn-group .btn {
    justify-content: center;
}

/* Footer Content */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #B0B3B8;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.developer-credit {
    font-size: 14px;
    color: #E4E6EB;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3A3B3C;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3A3B3C;
    color: #B0B3B8;
    font-size: 14px;
}

/* Modal Checkout */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 15px;
    max-width: 850px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    gap: 0;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    border: none;
    background: var(--light-color);
    z-index: 10;
}

.modal-close:hover {
    background-color: #E4E6EB;
    color: var(--text-color);
}

.modal-left {
    flex: 1.2;
    padding: 30px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-left::-webkit-scrollbar {
    display: none;
}

.modal-product-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.modal-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    width: fit-content;
}

.modal-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    margin: 10px 0;
}

.modal-description {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    margin: 15px 0 0 0;
}

.modal-share {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.modal-share span {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

.modal-share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gray-color);
    transition: var(--transition);
    font-size: 18px;
}

.modal-share a:hover {
    background-color: var(--primary-color);
    color: white;
}

.modal-right {
    flex: 1;
    padding: 30px;
    background-color: #fcfcfc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-right::-webkit-scrollbar {
    display: none;
}

.modal-checkout-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

.checkout-value {
    color: var(--gray-color);
    font-size: 14px;
    text-align: left;
}

.checkout-value.highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: stretch;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--light-color);
    cursor: pointer;
    border-radius: 4px;
    font-weight: 700;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-input {
    width: 50px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--dark-color);
    color: white;
    font-weight: 600;
}

.promo-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--light-color);
}

.total-section {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid var(--border-color);
}

.total-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 0;
}

.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, #1877F2 0%, #42B72A 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-checkout:hover {
    background: linear-gradient(135deg, #166fe5 0%, #36a420 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.favorite-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #C41E3A;
    font-weight: 600;
    margin-top: 15px;
    cursor: pointer;
}

.favorite-btn i {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .search-bar {
        max-width: 300px;
    }

    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 15px 0 0;
    }

    /* index.html nav-menu styles seem specific for mobile scroll */
    .nav-menu {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .nav-menu li {
        flex-shrink: 0;
    }

    main {
        padding: 30px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .product-card {
        grid-template-columns: 1fr;
    }

    .product-img {
        height: 180px;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 20px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Simplified Announcement Modal */
#announcementModal .modal-content {
    max-width: 450px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.announcement-header {
    background: linear-gradient(135deg, #1877F2 0%, #42B72A 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.announcement-header h2 {
    margin: 0;
    font-size: 20px;
}

.announcement-body {
    padding: 30px;
    text-align: center;
    background: white;
}

.announcement-body p {
    font-size: 15px;
    color: #4b4f56;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-announcement {
    background-color: #1877F2;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-announcement:hover {
    background-color: #166fe5;
}

@media (max-width: 850px) {
    .announcement-content {
        flex-direction: column !important;
    }

    .announcement-sidebar {
        width: 100%;
        flex-direction: row;
        padding: 20px;
        justify-content: center;
    }

    .announcement-close-btn {
        right: 15px;
        left: auto;
        transform: none;
    }

    .announcement-sidebar i {
        margin: 0 15px 0 0;
    }

    .modal-content {
        flex-direction: column;
        max-width: 95%;
    }

    .modal-left {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }

    .modal-right {
        padding: 20px;
    }

    .image-modal-content {
        width: 95%;
        height: auto;
    }
}

/* Image Modal */
#imageModal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

#imageModal.active {
    display: flex;
}

.image-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    z-index: 3001;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}