/**
 * GIFTY CM ROSE Frontend Styles
 */

/* Layout */
.gifty-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Layouts */
.gifty-header {
    padding: 15px 0;
    transition: background-color 0.3s ease;
}

.gifty-header.layout1 {
    text-align: left;
}

.gifty-header.layout2 {
    text-align: center;
}

.gifty-header.layout3 {
    text-align: right;
}

.gifty-menu {
    padding: 10px 0;
}

.gifty-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.gifty-menu li {
    margin: 0;
}

.gifty-menu a {
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
}

/* Hero Section */
.gifty-hero {
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.gifty-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Categories Grid */
.gifty-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.gifty-category-block {
    background: white;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gifty-category-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.gifty-subcategories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gifty-subcategories-list li {
    margin: 8px 0;
}

.gifty-subcategories-list a {
    text-decoration: none;
    color: #666;
    display: block;
    transition: color 0.3s;
}

.gifty-subcategories-list a:hover {
    color: #333;
}

.gifty-count {
    float: right;
    color: #999;
}

/* Listings Grid */
.gifty-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.gifty-listing-item {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.gifty-listing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.gifty-listing-item.gifty-featured {
    border: 2px solid gold;
}

.gifty-listing-image {
    height: 200px;
    overflow: hidden;
}

.gifty-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gifty-listing-details {
    padding: 20px;
}

.gifty-listing-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.gifty-listing-title a {
    text-decoration: none;
    color: #333;
}

.gifty-listing-meta {
    margin-bottom: 15px;
    font-size: 16px;
}

.gifty-price {
    font-weight: bold;
    color: #2c3e50;
    font-size: 20px;
}

.gifty-units-sold {
    color: #27ae60;
    font-size: 14px;
    margin-left: 10px;
}

.gifty-listing-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.gifty-favorite-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.gifty-favorite-toggle:hover {
    background-color: #f8f8f8;
}

.gifty-favorite-toggle.active .dashicons {
    color: #e74c3c;
}

/* Forms */
.gifty-submit-form,
.gifty-profile-form {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gifty-form-group {
    margin-bottom: 20px;
}

.gifty-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.gifty-form-group input[type="text"],
.gifty-form-group input[type="email"],
.gifty-form-group input[type="tel"],
.gifty-form-group input[type="number"],
.gifty-form-group input[type="password"],
.gifty-form-group select,
.gifty-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.gifty-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Buttons */
.gifty-button-primary,
.gifty-button-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.gifty-button-primary {
    color: white;
}

.gifty-button-primary:hover,
.gifty-button-secondary:hover {
    opacity: 0.9;
}

/* Search Filters */
.gifty-search-filters {
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gifty-search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.gifty-search-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.gifty-search-group input,
.gifty-search-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Dashboard */
.gifty-user-dashboard {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gifty-dashboard-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.gifty-tab {
    padding: 15px 30px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.gifty-tab:hover {
    background: #e9ecef;
}

.gifty-tab.active {
    background: white;
    color: #333;
    border-bottom: 2px solid #3498db;
}

.gifty-dashboard-content {
    padding: 30px;
}

.gifty-ads-table {
    width: 100%;
    border-collapse: collapse;
}

.gifty-ads-table th,
.gifty-ads-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.gifty-ads-table th {
    background: #f8f9fa;
    font-weight: 500;
}

.gifty-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.gifty-status-publish {
    background: #27ae60;
    color: white;
}

.gifty-status-pending {
    background: #f39c12;
    color: white;
}

.gifty-status-draft {
    background: #95a5a6;
    color: white;
}

/* Favorites Grid */
.gifty-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gifty-favorite-item {
    display: flex;
    background: #f8f9fa;
    border-radius: 5px;
    overflow: hidden;
}

.gifty-favorite-image {
    width: 100px;
    height: 100px;
    overflow: hidden;
}

.gifty-favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gifty-favorite-details {
    flex: 1;
    padding: 15px;
}

.gifty-favorite-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.gifty-favorite-details a {
    text-decoration: none;
    color: #333;
}

.gifty-remove-favorite {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

/* Footer */
.gifty-footer {
    padding: 40px 0;
    margin-top: 50px;
}

.gifty-footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gifty-footer-copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Messages */
.gifty-success,
.gifty-error {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.gifty-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gifty-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .gifty-form-row {
        grid-template-columns: 1fr;
    }
    
    .gifty-search-row {
        grid-template-columns: 1fr;
    }
    
    .gifty-dashboard-tabs {
        flex-direction: column;
    }
    
    .gifty-tab {
        text-align: center;
    }
    
    .gifty-ads-table {
        display: block;
        overflow-x: auto;
    }
}