/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
    cursor: default;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 280px;
    height: 60px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #73C14C;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 10px 45px 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    background: white;
    font-size: 14px;
    color: #666;
    width: 250px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #73C14C;
    box-shadow: 0 0 0 3px rgba(115, 193, 76, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    color: #73C14C;
    background: rgba(115, 193, 76, 0.1);
}

.filters {
    display: flex;
    gap: 15px;
}

.login-btn {
    background: linear-gradient(45deg, #73C14C, #128c7e);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 193, 76, 0.3);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    background: linear-gradient(45deg, #73C14C, #128c7e);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 193, 76, 0.3);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.profile-link:hover {
    background: #f8f9fa;
    color: #73C14C;
}

.logout-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logout-link:hover {
    background: #f8f9fa;
    color: #73C14C;
}

.panel-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.panel-link:hover {
    background: #f8f9fa;
    color: #73C14C;
}

.filter-select {
    padding: 8px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    background: white;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #73C14C;
    box-shadow: 0 0 0 3px rgba(115, 193, 76, 0.1);
}

/* Feed */
.feed {
    padding: 30px 0 50px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Skeleton Loading */
.skeleton-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-card .skeleton-image {
    width: 100%;
    height: 280px;
    background: #f0f0f0;
}

.skeleton-card .skeleton-info {
    padding: 20px;
}

.skeleton-card .skeleton-title {
    height: 18px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.skeleton-card .skeleton-avatar {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
}

.skeleton-card .skeleton-text {
    height: 14px;
    background: #f0f0f0;
    border-radius: 4px;
    flex: 1;
    margin-left: 8px;
}

.skeleton-card .skeleton-price {
    height: 16px;
    background: #f0f0f0;
    border-radius: 4px;
    width: 80px;
}

.skeleton-card .skeleton-stats {
    display: flex;
    gap: 15px;
}

.skeleton-card .skeleton-stat {
    height: 14px;
    background: #f0f0f0;
    border-radius: 4px;
    width: 50px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Skeleton for Stories */
.skeleton-story-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-story-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 3px solid #73C14C;
}

.skeleton-story-name {
    height: 12px;
    width: 50px;
    background: #f0f0f0;
    border-radius: 4px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 280px;
    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);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 10;
}


.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.left {
    left: 10px;
}

.carousel-btn.right {
    right: 10px;
}

.product-info {
    padding: 20px;
}

.store-info {
    display: flex;
    align-items: center;
    padding: 15px 10px 0;
    margin-bottom: 15px;
}

.store-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(45deg, #73C14C, #128c7e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}

.store-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e1e5e9;
    margin-right: 12px;
}

.store-meta {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.store-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-decoration: none;
}

.store-location {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-location .loc-icon {
    width: 14px;
    height: 14px;
    vertical-align: text-bottom;
    flex-shrink: 0;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-views {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-views i {
    color: #999;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #73C14C;
    margin-bottom: 15px;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    padding: 5px;
}

.action-btn:hover {
    color: #73C14C;
    transform: scale(1.1);
}

.like-btn.liked {
    color: #ff4757;
}

.whatsapp-btn {
    background: linear-gradient(45deg, #73C14C, #128c7e);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 193, 76, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.modal-body {
    padding: 30px 20px 20px;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Menu Toggle Button */
.menu-toggle {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    display: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(115, 193, 76, 0.1);
    color: #73C14C;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 10px 0;
    }

    .logo h1 {
        font-size: 24px;
    }

    .logo-icon {
        width: 280px;
        height: 60px;
    }

    .menu-toggle {
        display: block;
    }

    .header-right {
        display: none;
    }

    .header-right.show {
        display: flex;
        flex-direction: column;
        gap: 12px;
        position: absolute;
        top: 100%;
        right: 15px;
        left: 15px;
        background: white;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        z-index: 200;
    }

    .header-right .search-input {
        width: 100%;
    }

    .filters {
        flex-direction: column;
        gap: 10px;
    }

    .filter-select {
        width: 100%;
        min-width: auto;
    }

    .login-btn {
        width: 100%;
        justify-content: center;
    }

    .user-dropdown {
        width: 100%;
    }

    .user-btn {
        width: 100%;
        justify-content: center;
    }

    .dropdown-menu {
        right: auto;
        left: 0;
        min-width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        margin: 0 10px;
    }

    .product-info {
        padding: 15px;
    }
}

/* Stories Section */
.stories-section {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid #e1e5e9;
}

.stories-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.story-item:hover {
    transform: scale(1.05);
}

.story-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #73C14C;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #73C14C, #128c7e);
    position: relative;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-avatar .store-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, #73C14C, #128c7e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    margin: 0;
}

.story-name {
    font-size: 12px;
    color: #666;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stories Modal */
.stories-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.stories-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stories-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.stories-progress {
    flex: 1;
    display: flex;
    gap: 5px;
    margin-right: 20px;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.stories-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.stories-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Interactive Elements Cursor */
a,
button,
input[type="button"],
input[type="submit"],
.action-btn,
.carousel-btn,
.whatsapp-btn,
.like-btn,
.comment-submit,
.comment-like-btn,
.thumbnails .thumb,
.story-item,
.stories-nav-btn,
.menu-toggle,
.filter-select,
.close-modal,
.search-btn,
.product-card {
  cursor: pointer;
}

.stories-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* Story Frame - Força formato vertical rectangular */
.story-frame {
    width: min(420px, 92%);
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    margin: 0 auto;
    position: relative;
}

/* Para desktop, limitar altura para evitar scroll */
@media (min-width: 769px) {
    .story-frame {
        max-height: calc(100vh - 140px);
    }
}

/* Store name overlay in stories */
.story-store-name {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #73C14C, #128c7e);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    z-index: 11;
    text-decoration: none;
    transition: all 0.3s ease;
}

.story-store-name a {
    color: white;
    text-decoration: none;
}

.story-frame .story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
}

.stories-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.stories-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.stories-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.stories-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive Stories */
@media (max-width: 768px) {
    .stories-container {
        padding: 5px 0;
    }

    .story-item {
        gap: 5px;
    }

    .story-avatar {
        width: 60px;
        height: 60px;
    }

    .story-name {
        font-size: 11px;
        max-width: 60px;
    }

    .stories-header {
        padding: 15px;
    }

    .stories-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .product-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .action-buttons {
        justify-content: center;
    }

    .whatsapp-btn {
        justify-content: center;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    background: white;
    color: #666;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 44px;
    text-align: center;
}

.pagination-btn:hover {
    border-color: #73C14C;
    color: #73C14C;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(115, 193, 76, 0.2);
}

.pagination-btn.active {
    background: linear-gradient(45deg, #73C14C, #128c7e);
    color: white;
    border-color: #73C14C;
}

.pagination-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(115, 193, 76, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-dots {
    padding: 0 8px;
    color: #999;
    font-weight: bold;
    user-select: none;
}

.prev-btn,
.next-btn {
    font-weight: 700;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 4px;
        margin: 30px 0 15px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 40px;
    }

    .pagination-dots {
        padding: 0 4px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 2px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 36px;
    }

    .prev-btn,
    .next-btn {
        padding: 6px 8px;
    }
}
